/// <summary>
 /// The List Subscription Operations operation returns a list of
 /// create, update, and delete operations that were performed on a
 /// subscription during the specified timeframe.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715318.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ISubscriptionOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the List Subscription Operations
 /// operation.
 /// </param>
 /// <returns>
 /// The List Subscription Operations operation response.
 /// </returns>
 public static Task<SubscriptionListOperationsResponse> ListOperationsAsync(this ISubscriptionOperations operations, SubscriptionListOperationsParameters parameters)
 {
     return operations.ListOperationsAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// The List Subscription Operations operation returns a list of
 /// create, update, and delete operations that were performed on a
 /// subscription during the specified timeframe.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715318.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ISubscriptionOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the List Subscription Operations
 /// operation.
 /// </param>
 /// <returns>
 /// The List Subscription Operations operation response.
 /// </returns>
 public static SubscriptionListOperationsResponse ListOperations(this ISubscriptionOperations operations, SubscriptionListOperationsParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((ISubscriptionOperations)s).ListOperationsAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// The List Subscription Operations operation returns a list of
 /// create, update, and delete operations that were performed on a
 /// subscription during the specified timeframe.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715318.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ISubscriptionOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the List Subscription Operations operation.
 /// </param>
 /// <returns>
 /// The List Subscription Operations operation response.
 /// </returns>
 public static SubscriptionListOperationsResponse ListOperations(this ISubscriptionOperations operations, SubscriptionListOperationsParameters parameters)
 {
     try
     {
         return operations.ListOperationsAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }