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); }
/// <summary> /// Lists all of the CDN profiles within an Azure subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Profile> List(this IProfilesOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }