/// <summary>
 /// The List Role Sizes operation lists all of the role sizes that are
 /// valid for your subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IRoleSizeOperations.
 /// </param>
 /// <returns>
 /// The List Role Sizes operation response.
 /// </returns>
 public static RoleSizeListResponse List(this IRoleSizeOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRoleSizeOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 private ManagementClient()
     : base()
 {
     this._affinityGroups         = new AffinityGroupOperations(this);
     this._locations              = new LocationOperations(this);
     this._managementCertificates = new ManagementCertificateOperations(this);
     this._roleSizes              = new RoleSizeOperations(this);
     this._subscriptions          = new SubscriptionOperations(this);
     this.HttpClient.Timeout      = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private ManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._affinityGroups                     = new AffinityGroupOperations(this);
     this._locations                          = new LocationOperations(this);
     this._managementCertificates             = new ManagementCertificateOperations(this);
     this._roleSizes                          = new RoleSizeOperations(this);
     this._subscriptions                      = new SubscriptionOperations(this);
     this._apiVersion                         = "2014-05-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 public ManagementClient()
     : base()
 {
     this._affinityGroups                     = new AffinityGroupOperations(this);
     this._locations                          = new LocationOperations(this);
     this._managementCertificates             = new ManagementCertificateOperations(this);
     this._roleSizes                          = new RoleSizeOperations(this);
     this._subscriptions                      = new SubscriptionOperations(this);
     this._subscriptionServicePrincipals      = new SubscriptionServicePrincipalOperations(this);
     this._apiVersion                         = "2018-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Example #5
0
 /// <summary>
 /// The List Role Sizes operation lists all of the role sizes that are
 /// valid for your subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IRoleSizeOperations.
 /// </param>
 /// <returns>
 /// The List Role Sizes operation response.
 /// </returns>
 public static RoleSizeListResponse List(this IRoleSizeOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #6
0
 /// <summary>
 /// The List Role Sizes operation lists all of the role sizes that are
 /// valid for your subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IRoleSizeOperations.
 /// </param>
 /// <returns>
 /// The List Role Sizes operation response.
 /// </returns>
 public static Task <RoleSizeListResponse> ListAsync(this IRoleSizeOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }