/// <summary>
 /// Lists the Data Lake Store account objects within the subscription
 /// or within a specific resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.Store.IDataLakeStoreAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Optional. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all Data Lake
 /// Store account items.
 /// </param>
 /// <returns>
 /// Data Lake Store account list information response.
 /// </returns>
 public static DataLakeStoreAccountListResponse List(this IDataLakeStoreAccountOperations operations, string resourceGroupName, DataLakeStoreAccountListParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDataLakeStoreAccountOperations)s).ListAsync(resourceGroupName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists the Data Lake Store account objects within the subscription
 /// or within a specific resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.Store.IDataLakeStoreAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Optional. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all Data Lake
 /// Store account items.
 /// </param>
 /// <returns>
 /// Data Lake Store account list information response.
 /// </returns>
 public static Task<DataLakeStoreAccountListResponse> ListAsync(this IDataLakeStoreAccountOperations operations, string resourceGroupName, DataLakeStoreAccountListParameters parameters)
 {
     return operations.ListAsync(resourceGroupName, parameters, CancellationToken.None);
 }
        public List<DataLakeStoreAccount> ListAccounts(string resourceGroupName, string filter, int? top, int? skip)
        {
            var parameters = new DataLakeStoreAccountListParameters
            {
                Filter = filter,
                Top = top,
                Skip = skip
            };

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

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

            return accountList;
        }