Esempio n. 1
0
        private async Task <GoogleDriveFileInfoModel> DoLoadStreamInfoAsync(IGoogleDriveFile file, CancellationToken ct, IProgress <string> process)
        {
            var stream = new MemoryStream();
            await _gService.DownloadAsync(file.Id, stream, ct, process);

            var imageSource = await LoadThumbnailAsync(file, stream);

            var fileInfo = CreateFileInfo(file, imageSource);

            fileInfo.ImageStream = stream;
            return(fileInfo);
        }