예제 #1
0
 public override IAsyncOperation <StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, uint requestedSize, ThumbnailOptions options)
 {
     return(AsyncInfo.Run(async(cancellationToken) =>
     {
         if (ShellStorageFolder.IsShellPath(Path))
         {
             return null;
         }
         var zipFile = await StorageFile.GetFileFromPathAsync(Path);
         return await zipFile.GetThumbnailAsync(mode, requestedSize, options);
     }));
 }
예제 #2
0
 public static IAsyncOperation <BaseStorageFile> FromPathAsync(string path)
 {
     return(AsyncInfo.Run <BaseStorageFile>(async(cancellationToken) =>
     {
         if (ShellStorageFolder.IsShellPath(path))
         {
             if (await GetFile(path) is ShellFileItem file)
             {
                 return FromShellItem(file);
             }
         }
         return null;
     }));
 }