public IAzureBlob GetBlob(Uri containerUri, string blobName) { var container = new CloudBlobContainer(containerUri); CloudBlockBlob blob = container.GetBlockBlobReference(blobName); var azureBlob = new AzureBlob(blob); return(azureBlob); }
public IAzureBlob GetBlob(Uri containerUri, string blobName, Option <string> contentType, Option <string> contentEncoding) { var container = new CloudBlobContainer(Preconditions.CheckNotNull(containerUri, nameof(containerUri))); CloudBlockBlob blob = container.GetBlockBlobReference(Preconditions.CheckNonWhiteSpace(blobName, nameof(blobName))); contentType.ForEach(c => blob.Properties.ContentType = c); contentEncoding.ForEach(c => blob.Properties.ContentEncoding = c); var azureBlob = new AzureBlob(blob); return(azureBlob); }