public static async Task <IList <Zone> > ListAllAsync(this IZonesOperations operations)
        {
            var zones = new List <Zone>();

            var list = await operations.ListAsync();

            zones.AddRange(list);

            while (list.NextPageLink != null)
            {
                list = await operations.ListNextAsync(list.NextPageLink);

                zones.AddRange(list);
            }

            return(zones);
        }
Esempio n. 2
0
 /// <summary>
 /// Lists the DNS zones in all resource groups in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// The maximum number of DNS zones to return. If not specified, returns up to
 /// 100 zones.
 /// </param>
 public static IPage <Zone> List(this IZonesOperations operations, int?top = default(int?))
 {
     return(operations.ListAsync(top).GetAwaiter().GetResult());
 }