public static async Task <IList <FrontDoorModel> > ListAllAsync(this IFrontDoorsOperations operations) { var frontDoors = new List <FrontDoorModel>(); var list = await operations.ListAsync(); frontDoors.AddRange(list); while (list.NextPageLink != null) { list = await operations.ListNextAsync(list.NextPageLink); frontDoors.AddRange(list); } return(frontDoors); }
/// <summary> /// Lists all of the Front Doors within an Azure subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <FrontDoorModel> List(this IFrontDoorsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }