Beispiel #1
0
 /// <summary>
 /// The Delete Extension operation deletes the specified extension from
 /// a cloud service.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn169560.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>
 /// <param name='extensionId'>
 /// The identifier that was assigned to the extension when it was added
 /// to the cloud service
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginDeletingExtension(this IHostedServiceOperations operations, string serviceName, string extensionId)
 {
     try
     {
         return(operations.BeginDeletingExtensionAsync(serviceName, extensionId).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Begin Deleting Extension operation deletes the specified
 /// extension from a cloud service.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn169560.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>
 /// <param name='extensionId'>
 /// Required. The identifier that was assigned to the extension when it
 /// was added to the cloud service
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginDeletingExtensionAsync(this IHostedServiceOperations operations, string serviceName, string extensionId)
 {
     return(operations.BeginDeletingExtensionAsync(serviceName, extensionId, CancellationToken.None));
 }