Exemple #1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Services           = new ServicesOperations(this);
     ConfigServers      = new ConfigServersOperations(this);
     MonitoringSettings = new MonitoringSettingsOperations(this);
     Apps            = new AppsOperations(this);
     Bindings        = new BindingsOperations(this);
     Certificates    = new CertificatesOperations(this);
     CustomDomains   = new CustomDomainsOperations(this);
     Deployments     = new DeploymentsOperations(this);
     Operations      = new Operations(this);
     RuntimeVersions = new RuntimeVersionsOperations(this);
     Skus            = new SkusOperations(this);
     BaseUri         = new System.Uri("https://management.azure.com");
     ApiVersion      = "2020-11-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()
         }
     };
     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 CloudErrorJsonConverter());
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Services              = new ServicesOperations(this);
     ConfigServers         = new ConfigServersOperations(this);
     ConfigurationServices = new ConfigurationServicesOperations(this);
     ServiceRegistries     = new ServiceRegistriesOperations(this);
     BuildService          = new BuildServiceOperations(this);
     BuildpackBinding      = new BuildpackBindingOperations(this);
     BuildServiceBuilder   = new BuildServiceBuilderOperations(this);
     BuildServiceAgentPool = new BuildServiceAgentPoolOperations(this);
     MonitoringSettings    = new MonitoringSettingsOperations(this);
     Apps                             = new AppsOperations(this);
     Bindings                         = new BindingsOperations(this);
     Storages                         = new StoragesOperations(this);
     Certificates                     = new CertificatesOperations(this);
     CustomDomains                    = new CustomDomainsOperations(this);
     Deployments                      = new DeploymentsOperations(this);
     Operations                       = new Operations(this);
     RuntimeVersions                  = new RuntimeVersionsOperations(this);
     Skus                             = new SkusOperations(this);
     Gateways                         = new GatewaysOperations(this);
     GatewayRouteConfigs              = new GatewayRouteConfigsOperations(this);
     GatewayCustomDomains             = new GatewayCustomDomainsOperations(this);
     ApiPortals                       = new ApiPortalsOperations(this);
     ApiPortalCustomDomains           = new ApiPortalCustomDomainsOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     ApiVersion                       = "2022-01-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()
         }
     };
     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()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <CustomPersistentDiskProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CustomPersistentDiskProperties>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <CertificateProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CertificateProperties>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <StorageProperties>("storageType"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <StorageProperties>("storageType"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <UserSourceInfo>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <UserSourceInfo>("type"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }