/// <summary>
 /// Unregister your subscription to use Windows Azure Web Sites.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebSiteManagementClient.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse UnregisterSubscription(this IWebSiteManagementClient operations)
 {
     try
     {
         return(operations.UnregisterSubscriptionAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Unregister your subscription to use Azure Web Sites.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebSiteManagementClient.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> UnregisterSubscriptionAsync(this IWebSiteManagementClient operations)
 {
     return(operations.UnregisterSubscriptionAsync(CancellationToken.None));
 }