/// <summary>
 /// Register 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 RegisterSubscription(this IWebSiteManagementClient operations)
 {
     try
     {
         return(operations.RegisterSubscriptionAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Register 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> RegisterSubscriptionAsync(this IWebSiteManagementClient operations)
 {
     return(operations.RegisterSubscriptionAsync(CancellationToken.None));
 }