public static async Task <IList <Profile> > ListAllAsync(this IProfilesOperations operations)
        {
            var profiles = new List <Profile>();

            var list = await operations.ListAsync();

            profiles.AddRange(list);

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

                profiles.AddRange(list);
            }

            return(profiles);
        }
Example #2
0
 /// <summary>
 /// Lists all of the CDN profiles within an Azure subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Profile> ListNext(this IProfilesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }