Exemplo n.º 1
0
 /// <summary>
 /// Organization Validate proxy resource
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name
 /// </param>
 /// <param name='organizationName'>
 /// Organization resource name
 /// </param>
 /// <param name='body'>
 /// Organization resource model
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OrganizationResource> ValidateOrganizationAsync(this IValidationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateOrganizationWithHttpMessagesAsync(resourceGroupName, organizationName, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     MarketplaceAgreements  = new MarketplaceAgreementsOperations(this);
     OrganizationOperations = new OrganizationOperations(this);
     Organization           = new OrganizationOperationsOperations(this);
     Validations            = new ValidationsOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-03-01-preview";
     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());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Organization Validate proxy resource
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name
 /// </param>
 /// <param name='organizationName'>
 /// Organization resource name
 /// </param>
 /// <param name='body'>
 /// Organization resource model
 /// </param>
 public static OrganizationResource ValidateOrganization(this IValidationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body)
 {
     return(operations.ValidateOrganizationAsync(resourceGroupName, organizationName, body).GetAwaiter().GetResult());
 }