예제 #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)));
 }