void UploadHtml() { CloudBlobContainer blobContainer = BlobClient.GetContainerReference("compiled"); Parallel.ForEach(new DirectoryInfo(HtmlDir).GetFiles("*.html"), async(file) => { await AzureBlobUpload.UploadBlob(blobContainer.GetBlockBlobReference(file.Name), file.FullName); }); }
void UploadPhoto() { if (String.IsNullOrEmpty(PhotosDir)) { return; } CloudBlobContainer blobContainer = BlobClient.GetContainerReference("photos"); Parallel.ForEach(new DirectoryInfo(PhotosDir).GetFiles(), async(file) => { await AzureBlobUpload.UploadBlob(blobContainer.GetBlockBlobReference(file.Name), file.FullName); }); }
void UploadMetadata() { if (String.IsNullOrEmpty(SeriesJson) || String.IsNullOrEmpty(MainJson)) { return; } CloudBlobContainer blobContainer = BlobClient.GetContainerReference("metadata"); Task.WaitAll( AzureBlobUpload.UploadBlob(blobContainer.GetBlockBlobReference("main.json"), MainJson), AzureBlobUpload.UploadBlob(blobContainer.GetBlockBlobReference("series.json"), SeriesJson), AzureBlobUpload.UploadBlob(blobContainer.GetBlockBlobReference("rss.xml"), RssPath) ); }