Example #1
0
 /// <summary>
 /// Create a new <see cref="AzureBlob"/> from an Azure storage blob properties.
 /// </summary>
 /// <param name="blobProperties"></param>
 /// <returns></returns>
 public static AzureBlob FromBlobProperties(string blobPath, BlobProperties blobProperties, IDictionary <string, string> blobMetadata)
 {
     return(new AzureBlob
     {
         Path = blobPath,
         Checksum = blobProperties.ContentMD5,
         ContentType = blobProperties.ContentType,
         LastModified = blobProperties.LastModified.Value,
         Length = blobProperties.Length,
         Metadata = BlobMetadata.FromDictionary(blobMetadata)
     });
 }