Exemple #1
0
 /// <summary>
 /// The Delete Storage Account operation deletes the specifiedstorage
 /// account from Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='accountName'>
 /// The name of the storage account.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Delete(this IStorageAccountOperations operations, string accountName)
 {
     try
     {
         return(operations.DeleteAsync(accountName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Deletes a storage account in Microsoft Azure.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group within the user’s
 /// subscription.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the storage account within the specified
 /// resource group. Storage account names must be between 3 and 24
 /// characters in length and use numbers and lower-case letters only.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IStorageAccountOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.DeleteAsync(resourceGroupName, accountName, CancellationToken.None));
 }
Exemple #3
0
 /// <summary>
 /// The Delete Storage Account operation deletes the specifiedstorage
 /// account from Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='accountName'>
 /// The name of the storage account.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this IStorageAccountOperations operations, string accountName)
 {
     return(operations.DeleteAsync(accountName, CancellationToken.None));
 }