Пример #1
0
 private static StorageFolder GetFolderFromStrategy(StorageHelper.StorageStrategy location)
 {
     switch (location)
     {
         case StorageHelper.StorageStrategy.Roaming:
             return ApplicationData.Current.RoamingFolder;
         default:
             return ApplicationData.Current.LocalFolder;
     }
 }
Пример #2
0
 public static async Task<StorageFolder> GetFolderAsync(string path,
    StorageHelper.StorageStrategy location = StorageHelper.StorageStrategy.Local)
 {
     return await GetFolderAsync(path, GetFolderFromStrategy(location)).ConfigureAwait(false);
 }
Пример #3
0
 public static async Task<StorageFile> GetFileAsync(string path,
    StorageHelper.StorageStrategy location = StorageHelper.StorageStrategy.Local)
 {
     return await CreateFileAsync(path, GetFolderFromStrategy(location));
 }