Class GrpcPagedEnumerable<TRequest, TResponse, TResource>
A sequence of resources, obtained lazily via API operations which retrieve a page at a time.
Inheritance
System.Object
PagedEnumerable<TResponse, TResource>
GrpcPagedEnumerable<TRequest, TResponse, TResource>
Implements
System.Collections.Generic.IEnumerable<TResource>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax.Grpc
Assembly: Google.Api.Gax.Grpc.dll
Syntax
public sealed class GrpcPagedEnumerable<TRequest, TResponse, TResource> : PagedEnumerable<TResponse, TResource>, IEnumerable<TResource>, IEnumerable where TRequest : class, IPageRequest, IMessage<TRequest> where TResponse : class, IPageResponse<TResource>, IMessage<TResponse>
Type Parameters
Name | Description |
---|---|
TRequest | The API request type. |
TResponse | The API response type. Each response contains a page of resources. |
TResource | The resource type contained within the response. |
Constructors
GrpcPagedEnumerable(ApiCall<TRequest, TResponse>, TRequest, CallSettings)
Creates a new lazily-evaluated sequence from the given API call, initial request, and call settings.
Declaration
public GrpcPagedEnumerable(ApiCall<TRequest, TResponse> apiCall, TRequest request, CallSettings callSettings)
Parameters
Type | Name | Description |
---|---|---|
ApiCall<TRequest, TResponse> | apiCall | The API call made each time a page is required. |
TRequest | request | The initial request. |
CallSettings | callSettings | The settings to apply to each API call. |
Remarks
The request is cloned each time the sequence is evaluated.
Methods
AsRawResponses()
Declaration
public override IEnumerable<TResponse> AsRawResponses()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TResponse> |
Overrides
Google.Api.Gax.PagedEnumerable<TResponse, TResource>.AsRawResponses()
GetEnumerator()
Declaration
public override IEnumerator<TResource> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TResource> |
Overrides
Google.Api.Gax.PagedEnumerable<TResponse, TResource>.GetEnumerator()
ReadPage(Int32)
Declaration
public override Page<TResource> ReadPage(int pageSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageSize |
Returns
Type | Description |
---|---|
Page<TResource> |
Overrides
Google.Api.Gax.PagedEnumerable<TResponse, TResource>.ReadPage(System.Int32)