Example #1
0
 /// <summary>
 /// The Delete Hosted Service operation deletes the specified cloud
 /// service from Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IHostedServiceOperations.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the cloud service.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginDeletingAll(this IHostedServiceOperations operations, string serviceName)
 {
     try
     {
         return(operations.BeginDeletingAllAsync(serviceName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The DeleteAll Hosted Service operation deletes the specified cloud
 /// service as well as operating system disk, attached data disks, and
 /// the source blobs for the disks from storage from Microsoft Azure.
 /// (see
 /// 'http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx'
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IHostedServiceOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the cloud service.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginDeletingAllAsync(this IHostedServiceOperations operations, string serviceName)
 {
     return(operations.BeginDeletingAllAsync(serviceName, CancellationToken.None));
 }