public GetBlob ( string containerName, string fileName ) : Task |
||
containerName | string | |
fileName | string | |
리턴 | Task |
internal static async Task CreateThumbnailAsync(StorageRepository repo, string fileName, TextWriter log) { using (var memStream = await repo.GetBlob(StorageConfig.PhotosBlobContainerName, fileName)) { MemoryStream thumbnail = null; try { thumbnail = PhotoEditor.ProcessImage(memStream); await repo.UploadBlobAsync(thumbnail, StorageConfig.ThumbnailsBlobContainerName, fileName); } catch (Exception oops) { await log.WriteAsync(oops.Message); throw oops; } finally { if (null != thumbnail) { thumbnail.Dispose(); } } } }