/// <summary>
 /// Check available SKUs.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Resource location.
 /// </param>
 /// <param name='skus'>
 /// The SKU of the resource.
 /// </param>
 /// <param name='kind'>
 /// The Kind of the resource.
 /// </param>
 /// <param name='type'>
 /// The Type of the resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckSkuAvailabilityResultList> ListAsync(this ICheckSkuAvailabilityOperations operations, string location, IList <string> skus, string kind, string type, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(location, skus, kind, type, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     CognitiveServicesAccounts = new CognitiveServicesAccountsOperations(this);
     Accounts             = new AccountsOperations(this);
     Operations           = new Operations(this);
     CheckSkuAvailability = new CheckSkuAvailabilityOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2017-04-18";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Check available SKUs.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Resource location.
 /// </param>
 /// <param name='skus'>
 /// The SKU of the resource.
 /// </param>
 /// <param name='kind'>
 /// The Kind of the resource.
 /// </param>
 /// <param name='type'>
 /// The Type of the resource.
 /// </param>
 public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOperations operations, string location, IList <string> skus, string kind, string type)
 {
     return(operations.ListAsync(location, skus, kind, type).GetAwaiter().GetResult());
 }