public async Task <BlobReceipt> TryReadAsync(CloudBlockBlob blob, CancellationToken cancellationToken) { if (!await blob.TryFetchAttributesAsync(cancellationToken)) { return(null); } return(BlobReceipt.FromMetadata(blob.Metadata)); }
public async Task <BlobReceipt> TryReadAsync(BlockBlobClient blob, CancellationToken cancellationToken) { var properties = await blob.FetchPropertiesOrNullIfNotExistAsync(cancellationToken).ConfigureAwait(false); if (properties == null) { return(null); } return(BlobReceipt.FromMetadata(properties.Metadata)); }