コード例 #1
0
 /// <summary>
 /// Create or update a subscription-level key used for Real User Metrics
 /// collection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserMetricsModel> CreateOrUpdateAsync(this ITrafficManagerUserMetricsKeysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 protected override void Initialize()
 {
     Endpoints             = new EndpointsOperations(this);
     Profiles              = new ProfilesOperations(this);
     GeographicHierarchies = new GeographicHierarchiesOperations(this);
     HeatMap = new HeatMapOperations(this);
     TrafficManagerUserMetricsKeys = new TrafficManagerUserMetricsKeysOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2018-04-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());
 }
コード例 #3
0
 /// <summary>
 /// Delete a subscription-level key used for Real User Metrics collection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static DeleteOperationResult Delete(this ITrafficManagerUserMetricsKeysOperations operations)
 {
     return(operations.DeleteAsync().GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// Create or update a subscription-level key used for Real User Metrics
 /// collection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static UserMetricsModel CreateOrUpdate(this ITrafficManagerUserMetricsKeysOperations operations)
 {
     return(operations.CreateOrUpdateAsync().GetAwaiter().GetResult());
 }