Ejemplo n.º 1
0
        public List <DnsZone> ListDnsZones(string resourceGroupName, string endsWith)
        {
            ZoneListParameters zoneListParameters = new ZoneListParameters
            {
                Filter = endsWith == null ? null : string.Format("endswith(Name,'{0}')", endsWith)
            };

            ZoneListResponse getResponse = this.DnsManagementClient.Zones.List(resourceGroupName, zoneListParameters);

            return(getResponse.Zones.Select(zoneInResponse => new DnsZone
            {
                Name = zoneInResponse.Name,
                ResourceGroupName = resourceGroupName,
                Etag = zoneInResponse.ETag,
                Tags = TagsConversionHelper.CreateTagHashtable(zoneInResponse.Tags),
            })
                   .ToList());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Lists the DNS zones within a resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Dns.IZoneOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns the default
 /// number of zones.
 /// </param>
 /// <returns>
 /// The response to a Zone List or ListAll operation.
 /// </returns>
 public static Task <ZoneListResponse> ListZonesInSubscriptionAsync(this IZoneOperations operations, ZoneListParameters parameters)
 {
     return(operations.ListZonesInSubscriptionAsync(parameters, CancellationToken.None));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Lists the DNS zones within a resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Dns.IZoneOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns the default
 /// number of zones.
 /// </param>
 /// <returns>
 /// The response to a Zone List or ListAll operation.
 /// </returns>
 public static Task <ZoneListResponse> ListZonesInResourceGroupAsync(this IZoneOperations operations, string resourceGroupName, ZoneListParameters parameters)
 {
     return(operations.ListZonesInResourceGroupAsync(resourceGroupName, parameters, CancellationToken.None));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Lists the DNS zones within a resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Dns.IZoneOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns the default
 /// number of zones.
 /// </param>
 /// <returns>
 /// The response to a Zone List or ListAll operation.
 /// </returns>
 public static ZoneListResponse ListZonesInSubscription(this IZoneOperations operations, ZoneListParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IZoneOperations)s).ListZonesInSubscriptionAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Lists the DNS zones within a resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Management.Dns.IZoneOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns the default
 /// number of zones.
 /// </param>
 /// <returns>
 /// The response to a Zone List or ListAll operation.
 /// </returns>
 public static ZoneListResponse List(this IZoneOperations operations, string resourceGroupName, ZoneListParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IZoneOperations)s).ListAsync(resourceGroupName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }