/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Locations = new LocationsOperations(this); PrivateClouds = new PrivateCloudsOperations(this); Clusters = new ClustersOperations(this); Datastores = new DatastoresOperations(this); HcxEnterpriseSites = new HcxEnterpriseSitesOperations(this); Authorizations = new AuthorizationsOperations(this); GlobalReachConnections = new GlobalReachConnectionsOperations(this); WorkloadNetworks = new WorkloadNetworksOperations(this); CloudLinks = new CloudLinksOperations(this); Addons = new AddonsOperations(this); ScriptPackages = new ScriptPackagesOperations(this); ScriptCmdlets = new ScriptCmdletsOperations(this); ScriptExecutions = new ScriptExecutionsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2021-06-01"; 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() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AddonProperties>("addonType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AddonProperties>("addonType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <WorkloadNetworkDhcpEntity>("dhcpType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <WorkloadNetworkDhcpEntity>("dhcpType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ScriptExecutionParameter>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ScriptExecutionParameter>("type")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Locations = new LocationsOperations(this); PrivateClouds = new PrivateCloudsOperations(this); Clusters = new ClustersOperations(this); HcxEnterpriseSites = new HcxEnterpriseSitesOperations(this); Authorizations = new AuthorizationsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2020-03-20"; 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()); }