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

ListApplications() public method

public ListApplications ( string resourceGroupName, string accountName ) : IEnumerable
resourceGroupName string
accountName string
return IEnumerable
        public virtual IEnumerable<PSApplication> ListApplications(string resourceGroupName, string accountName)
        {
            if (string.IsNullOrEmpty(resourceGroupName))
            {
                // use resource mgr to see if account exists and then use resource group name to do the actual lookup
                resourceGroupName = GetGroupForAccount(accountName);
            }

            IPage<Application> response = BatchManagementClient.Application.List(resourceGroupName, accountName);
            List<PSApplication> psApplications = response.Select(ConvertApplicationToPSApplication).ToList();

            string nextLink = response.NextPageLink;
            while (nextLink != null)
            {
                response = BatchManagementClient.Application.ListNext(nextLink);
                psApplications.AddRange(response.Select(ConvertApplicationToPSApplication));
                nextLink = response.NextPageLink;
            }

            return psApplications;
        }
BatchClient