예제 #1
0
        private ListRequest CreateListDatasetsRequest(ProjectReference projectReference, ListDatasetsOptions options)
        {
            var request = Service.Datasets.List(projectReference.ProjectId);

            options?.ModifyRequest(request);
            return(request);
        }
예제 #2
0
        /// <inheritdoc />
        public override IPagedEnumerable <DatasetList, BigqueryDataset> ListDatasets(ProjectReference projectReference, ListDatasetsOptions options = null)
        {
            GaxPreconditions.CheckNotNull(projectReference, nameof(projectReference));

            var pageManager = new DatasetPageManager(this);

            return(new PagedEnumerable <ListRequest, DatasetList, BigqueryDataset>(
                       () => CreateListDatasetsRequest(projectReference, options),
                       pageManager));
        }
 /// <summary>
 /// Lists the datasets within the specified project.
 /// This method just creates a <see cref="ProjectReference"/> and delegates to <see cref="ListDatasets(ProjectReference, ListDatasetsOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project to list the datasets from. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>A sequence of datasets within the specified project.</returns>
 public virtual IPagedEnumerable <DatasetList, BigqueryDataset> ListDatasets(string projectId, ListDatasetsOptions options = null) =>
 ListDatasets(GetProjectReference(projectId), options);
 /// <summary>
 /// Lists the datasets within the specified project.
 /// </summary>
 /// <param name="projectReference">A fully-qualified identifier for the project. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>A sequence of datasets within the specified project.</returns>
 public virtual IPagedEnumerable <DatasetList, BigqueryDataset> ListDatasets(ProjectReference projectReference, ListDatasetsOptions options = null)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Asynchronously lists the datasets within this client's project.
 /// This method just creates a <see cref="ProjectReference"/> and delegates to <see cref="ListDatasetsAsync(ProjectReference, ListDatasetsOptions)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>An asynchronous sequence of datasets within this project.</returns>
 public virtual IPagedAsyncEnumerable <DatasetList, BigqueryDataset> ListDatasetsAsync(ListDatasetsOptions options = null) =>
 ListDatasetsAsync(GetProjectReference(ProjectId), options);