Ejemplo n.º 1
0
 /// <summary>
 /// Gets a list of service tag information resources.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location that will be used as a reference for version (not as a filter
 /// based on location, you will get the list of service tags with prefix
 /// details across all regions but limited to the cloud that your subscription
 /// belongs to).
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceTagsListResult> ListAsync(this IServiceTagsOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     VirtualNetworks                  = new VirtualNetworksOperations(this);
     Subnets                          = new SubnetsOperations(this);
     PrivateEndpoints                 = new PrivateEndpointsOperations(this);
     NetworkInterfaces                = new NetworkInterfacesOperations(this);
     RouteTables                      = new RouteTablesOperations(this);
     Routes                           = new RoutesOperations(this);
     NetworkSecurityGroups            = new NetworkSecurityGroupsOperations(this);
     SecurityRules                    = new SecurityRulesOperations(this);
     DefaultSecurityRules             = new DefaultSecurityRulesOperations(this);
     ServiceTags                      = new ServiceTagsOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     ApiVersion                       = "2020-07-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());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets a list of service tag information resources.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location that will be used as a reference for version (not as a filter
 /// based on location, you will get the list of service tags with prefix
 /// details across all regions but limited to the cloud that your subscription
 /// belongs to).
 /// </param>
 public static ServiceTagsListResult List(this IServiceTagsOperations operations, string location)
 {
     return(operations.ListAsync(location).GetAwaiter().GetResult());
 }