TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lu Lu
NA
1
1.3k
Store a custom property syncing with a Server
Oct 17 2013 9:54 AM
In my windows store app i sync with a Server and save files in this way:
StorageFile file = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName),
CreationCollisionOption.GenerateUniqueName);
var downloader = new BackgroundDownloader();
DownloadOperation download = downloader.CreateDownload(uri, file);
Now i want to add a metadata to the file such as the modificationDate of the file
on the Server.
How can i store this information in order to retrieve the value if i close and re-open the app? Maybe the perfect solution is to extend the StorageFile class but it is sealed
A possible solution is to add the metadata in the field Comment of a file:
List<KeyValuePair<string, object>> extraProperties = new List<KeyValuePair<string, object>>();
extraProperties.Add(new KeyValuePair<string, object>("System.Comment", modificationDate));
await file.Properties.SavePropertiesAsync(extraProperties);
But this returns me an error: "
Error HRESULT E_FAIL has been returned from a call to a COM component
"....
Reply
Answers (
0
)
Dynamic templatefield in gridview
To Keep Page Alive and Getting The Client Machine Details.