This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 在用户完成更改并调用CompleteUpdatesAsync之前,阻止对文件的更新 | |
// Before User finished the file Update and call the CompleteUpdatesAsync,it can prevent other updates the file. | |
CachedFileManager.DeferUpdates(storageFile); | |
//当完成更改时,其他应用程序才可以对该文件进行更改。 | |
// When the update is complete,the other can update the file | |
FileUpdateStatus status = await CachedFileManager.CompleteUpdatesAsync(storageFile); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Uses the local list of accounts and returns an XML formatted string representing the list | |
/// </summary> | |
/// <returns>XML formatted list of accounts</returns> | |
public static string SerializeAccountListToXml() | |
{ | |
XmlSerializer xmlizer = new XmlSerializer(typeof(List<Account>)); | |
StringWriter writer = new StringWriter(); | |
xmlizer.Serialize(writer, AccountList); |
NewerOlder