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); })); }
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; })); }