public IEnumerable <MSADL.Analytics.Models.JobRecurrenceInformation> ListJobRecurrences(JobReccurenceListingParameters parameters) { var pageiter = new Rest.PagedIterator <MSADLA.Models.JobRecurrenceInformation>(); pageiter.GetFirstPage = () => this.RestClients.JobsClient.Recurrence.List(this.Account.Name, parameters.DateRange.LowerBound, parameters.DateRange.UpperBound); pageiter.GetNextPage = p => this.RestClients.JobsClient.Recurrence.ListNext(p.NextPageLink); int top = 0; var recurrences = pageiter.EnumerateItems(top); return(recurrences); }
public IEnumerable <MSADLA.Models.SasTokenInfo> ListBlobStorageSasTokens(string storage_account, string container) { var pageiter = new Rest.PagedIterator <MSADLA.Models.SasTokenInfo>(); pageiter.GetFirstPage = () => this.RestClients.AccountClient.StorageAccounts.ListSasTokens(this.Account.ResourceGroup, this.Account.Name, storage_account, container); pageiter.GetNextPage = p => this.RestClients.AccountClient.StorageAccounts.ListSasTokensNext(p.NextPageLink); int top = 0; var items = pageiter.EnumerateItems(top); return(items); }
public IEnumerable <MSADLA.Models.StorageAccountInfo> ListBlobStorageAccounts() { var pageiter = new Rest.PagedIterator <MSADLA.Models.StorageAccountInfo>(); pageiter.GetFirstPage = () => this.RestClients.AccountClient.StorageAccounts.ListByAccount(this.Account.ResourceGroup, this.Account.Name); pageiter.GetNextPage = p => this.RestClients.AccountClient.StorageAccounts.ListByAccountNext(p.NextPageLink); int top = 0; var accounts = pageiter.EnumerateItems(top); return(accounts); }
public IEnumerable <ADL.Analytics.Models.USqlTableStatistics> ListTableStatistics(string dbname, string schema, string tablename) { var pageiter = new Rest.PagedIterator <MSADLA.Models.USqlTableStatistics>(); pageiter.GetFirstPage = () => this.RestClients.CatalogClient.Catalog.ListTableStatistics(this.Account.Name, dbname, schema, tablename); pageiter.GetNextPage = p => this.RestClients.CatalogClient.Catalog.ListTableStatisticsNext(p.NextPageLink); int top = 0; var items = pageiter.EnumerateItems(top); return(items); }
public IEnumerable <ADL.Analytics.Models.USqlCredential> ListCredential(string dbname) { var oDataQuery = new MSODATA.ODataQuery <MSADLA.Models.USqlCredential>(); string select_cols = null; bool? count = null; var pageiter = new Rest.PagedIterator <MSADLA.Models.USqlCredential>(); pageiter.GetFirstPage = () => this.RestClients.CatalogClient.Catalog.ListCredentials(this.Account.Name, dbname, oDataQuery, select_cols, count); pageiter.GetNextPage = p => this.RestClients.CatalogClient.Catalog.ListCredentialsNext(p.NextPageLink); int top = 0; var items = pageiter.EnumerateItems(top); return(items); }
public IEnumerable <JobInfo> ListJobs(JobListingParameters parameters) { var odata_query = new Microsoft.Rest.Azure.OData.ODataQuery <MSADL.Analytics.Models.JobInformation>(); odata_query.OrderBy = parameters.Sorting.CreateOrderByString(); odata_query.Filter = parameters.Filter.ToFilterString(); // enumerate the job objects // Other parameters string opt_select = null; bool? opt_count = null; var pageiter = new Rest.PagedIterator <MSADLA.Models.JobInformation>(); pageiter.GetFirstPage = () => this.RestClients.JobsClient.Job.List(this.Account.Name, odata_query, opt_select, opt_count); pageiter.GetNextPage = p => this.RestClients.JobsClient.Job.ListNext(p.NextPageLink); var jobs = pageiter.EnumerateItems(parameters.Top); // convert them to the JobInfo var jobinfos = jobs.Select(j => new JobInfo(j, this.Account)); return(jobinfos); }