Microsoft.Azure.Commands.Batch.Models.BatchClient.ListAllAccounts C# (CSharp) Method

ListAllAccounts() private method

Appends all accounts into a list.
private ListAllAccounts ( IPage response ) : IEnumerable
response IPage The list of accounts.
return IEnumerable
        internal IEnumerable<BatchAccount> ListAllAccounts(IPage<BatchAccount> response)
        {
            var accountResources = new List<BatchAccount>();
            accountResources.AddRange(response);

            var nextLink = response.NextPageLink;
            while (nextLink != null)
            {
                response = ListNextAccounts(nextLink);
                accountResources.AddRange(response);
                nextLink = response.NextPageLink;
            }

            return accountResources;
        }
BatchClient