Skip to content

Instantly share code, notes, and snippets.

@lindexi
Created November 25, 2016 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindexi/ff6e079c03a0b98c55cc562e32c44432 to your computer and use it in GitHub Desktop.
Save lindexi/ff6e079c03a0b98c55cc562e32c44432 to your computer and use it in GitHub Desktop.
// 在用户完成更改并调用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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment