예제 #1
0
 private async Task ReadLeaseBlobMetadata(IStorageBlockBlob blob, CancellationToken cancellationToken)
 {
     try
     {
         await blob.FetchAttributesAsync(cancellationToken);
     }
     catch (StorageException exception)
     {
         if (exception.IsNotFoundBlobOrContainerNotFound())
         {
             // The user deleted the receipt or its container;
         }
         else
         {
             throw;
         }
     }
 }
예제 #2
0
 private async Task ReadLeaseBlobMetadata(IStorageBlockBlob blob, CancellationToken cancellationToken)
 {
     try
     {
         await blob.FetchAttributesAsync(cancellationToken);
     }
     catch (StorageException exception)
     {
         if (exception.RequestInformation != null &&
             exception.RequestInformation.HttpStatusCode == 404)
         {
             // the blob no longer exists
         }
         else
         {
             throw;
         }
     }
 }
 private async Task ReadLeaseBlobMetadata(IStorageBlockBlob blob, CancellationToken cancellationToken)
 {
     try
     {
         await blob.FetchAttributesAsync(cancellationToken);
     }
     catch (StorageException exception)
     {
         if (exception.IsNotFoundBlobOrContainerNotFound())
         {
             // The user deleted the receipt or its container;
         }
         else
         {
             throw;
         }
     }
 }
예제 #4
0
 private async Task ReadLeaseBlobMetadata(IStorageBlockBlob blob, CancellationToken cancellationToken)
 {
     try
     {
         await blob.FetchAttributesAsync(cancellationToken);
     }
     catch (StorageException exception)
     {
         if (exception.RequestInformation != null &&
             exception.RequestInformation.HttpStatusCode == 404)
         {
             // the blob no longer exists
         }
         else
         {
             throw;
         }
     }
 }