示例#1
0
        private async Task Run(CloudBlockBlob blob)
        {
            var bytes = await _cancellationsPageDownloader.DownloadAsync()
                        .ConfigureAwait(false);

            await _cloudBlockBlobUpdater.UpdateAsync(blob, bytes);
        }
        private async Task Run(DownloadCourseMessage message, CloudBlockBlob htmlBlockBlob, CancellationToken cancellationToken)
        {
            using (var stream = await _downloader.DownloadAsync(message.WebsiteDomain, message.WebsitePath, cancellationToken)
                                .ConfigureAwait(false))
            {
                using (var ms = new MemoryStream())
                {
                    await stream.CopyToAsync(ms)
                    .ConfigureAwait(false);

                    await _cloudBlockBlobUpdater.UpdateAsync(htmlBlockBlob, ms.ToArray())
                    .ConfigureAwait(false);
                }
            }
        }
示例#3
0
        private async Task Run(CloudBlockBlob blob)
        {
            var bytes = await _eventsJsonDownloader.Download().ConfigureAwait(false);

            await _cloudBlockBlobUpdater.UpdateAsync(blob, bytes);
        }