<FileTransferSettings>
<UploadPath src="user">C:\uploads</UploadPath>
<DownloadPath src="app">C:\downloads</DownloadPath>
</FileTransferSettings>
I'd want to deserialize this XML into a FileTransferSettings object with 2 properties - UploadPath and DownloadPath. But I also want to preserve the src
attribute for each property in a way that my code can interrogate it.
I think creating an associated UploadPathSrc and DownloadPathSrc property is a bit awkward and cumbersome.
Is there another way to represent this in .NET? To me, the src
attribute seems like it should be treated as metadata. Is there a best practice for this?
(For background into why I'm trying to do this - see my previous question).
Thanks.