本文整理匯總了C#中Microsoft.WindowsAzure.Storage.Blob.CloudBlob.AbortCopy方法的典型用法代碼示例。如果您正苦於以下問題:C# CloudBlob.AbortCopy方法的具體用法?C# CloudBlob.AbortCopy怎麽用?C# CloudBlob.AbortCopy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.WindowsAzure.Storage.Blob.CloudBlob
的用法示例。
在下文中一共展示了CloudBlob.AbortCopy方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AbortCopy
/// <summary>
/// Abort copy operation on specified blob
/// </summary>
/// <param name="blob">CloudBlob object</param>
/// <param name="copyId">Copy id</param>
/// <param name="accessCondition">Access condition</param>
/// <param name="options">Blob request options</param>
/// <param name="operationContext">Operation context</param>
public void AbortCopy(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
try
{
blob.AbortCopy(copyId, accessCondition, options, operationContext);
}
catch (StorageException e)
{
if (e.IsSuccessfulResponse())
{
//The abort operation is successful, although get an exception
return;
}
else
{
throw;
}
}
}