/// <summary>
 /// Gets the first page of the Data Lake Store account objects within
 /// the specified Data Lake Analytics account. This includes a link to
 /// the next page, if any.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.Analytics.IDataLakeAnalyticsAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Analytics account to list Data
 /// Lake Store accounts for.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all account
 /// items.
 /// </param>
 /// <returns>
 /// Data Lake Account list information.
 /// </returns>
 public static Task<DataLakeAnalyticsAccountListDataLakeStoreResponse> ListDataLakeStoreAccountsAsync(this IDataLakeAnalyticsAccountOperations operations, string resourceGroupName, string accountName, DataLakeAnalyticsAccountListParameters parameters)
 {
     return operations.ListDataLakeStoreAccountsAsync(resourceGroupName, accountName, parameters, CancellationToken.None);
 }
        public List<DataLakeAnalyticsAccount> ListAccounts(string resourceGroupName, string filter, int? top, int? skip)
        {
            var parameters = new DataLakeAnalyticsAccountListParameters
            {
                Filter = filter,
                Top = top,
                Skip = skip
            };

            var accountList = new List<DataLakeAnalyticsAccount>();
            var response = _accountClient.DataLakeAnalyticsAccount.List(resourceGroupName, parameters);
            accountList.AddRange(response.Value);

            while (!string.IsNullOrEmpty(response.NextLink))
            {
                response = ListAccountsWithNextLink(response.NextLink);
                accountList.AddRange(response.Value);
            }

            return accountList;
        }
 /// <summary>
 /// Gets the first page of the Data Lake Store account objects within
 /// the specified Data Lake Analytics account. This includes a link to
 /// the next page, if any.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.Analytics.IDataLakeAnalyticsAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Analytics account to list Data
 /// Lake Store accounts for.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all account
 /// items.
 /// </param>
 /// <returns>
 /// Data Lake Account list information.
 /// </returns>
 public static DataLakeAnalyticsAccountListDataLakeStoreResponse ListDataLakeStoreAccounts(this IDataLakeAnalyticsAccountOperations operations, string resourceGroupName, string accountName, DataLakeAnalyticsAccountListParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDataLakeAnalyticsAccountOperations)s).ListDataLakeStoreAccountsAsync(resourceGroupName, accountName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }