/// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     ApplicationTypes        = new ApplicationTypesOperations(this);
     ApplicationTypeVersions = new ApplicationTypeVersionsOperations(this);
     Applications            = new ApplicationsOperations(this);
     Services              = new ServicesOperations(this);
     ManagedClusters       = new ManagedClustersOperations(this);
     ManagedClusterVersion = new ManagedClusterVersionOperations(this);
     Operations            = new Operations(this);
     NodeTypes             = new NodeTypesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-05-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 <Partition>("partitionScheme"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Partition>("partitionScheme"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ScalingMechanism>("kind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ScalingMechanism>("kind"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ScalingTrigger>("kind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ScalingTrigger>("kind"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServicePlacementPolicy>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServicePlacementPolicy>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     SignedInUser        = new SignedInUserOperations(this);
     Applications        = new ApplicationsOperations(this);
     DeletedApplications = new DeletedApplicationsOperations(this);
     Groups                           = new GroupsOperations(this);
     ServicePrincipals                = new ServicePrincipalsOperations(this);
     Users                            = new UsersOperations(this);
     Objects                          = new ObjectsOperations(this);
     Domains                          = new DomainsOperations(this);
     OAuth2PermissionGrant            = new OAuth2PermissionGrantOperations(this);
     BaseUri                          = new System.Uri("https://graph.windows.net");
     ApiVersion                       = "1.6";
     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 <DirectoryObject>("objectType"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <DirectoryObject>("objectType"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
예제 #3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Users             = new UsersOperations(this);
     Applications      = new ApplicationsOperations(this);
     ServicePrincipals = new ServicePrincipalsOperations(this);
     Groups            = new GroupsOperations(this);
     DirectoryObjects  = new DirectoryObjectsOperations(this);
     ApiVersion        = "v1.0";
     BaseUri           = new System.Uri("https://graph.microsoft.com");
     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());
 }