/// <summary> /// Gets the default Geographic Hierarchy used by the Geographic traffic /// routing method. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TrafficManagerGeographicHierarchy> GetDefaultAsync(this IGeographicHierarchiesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDefaultWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Endpoints = new EndpointsOperations(this); Profiles = new ProfilesOperations(this); GeographicHierarchies = new GeographicHierarchiesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2017-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() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
///GENMHASH:0A1A0463CFC77314424EC4A0283ED5A4:431E308A3744A61C1195798E3EE20640 internal GeographicHierarchiesImpl(ITrafficManager trafficManager, IGeographicHierarchiesOperations inner) : base(inner) { this.manager = trafficManager; }
/// <summary> /// Gets the default Geographic Hierarchy used by the Geographic traffic /// routing method. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static TrafficManagerGeographicHierarchy GetDefault(this IGeographicHierarchiesOperations operations) { return(operations.GetDefaultAsync().GetAwaiter().GetResult()); }