/// <summary> /// Creates a new lazily-evaluated asynchronous sequence from the given API call, initial request, and call settings. /// </summary> /// <remarks>The request is cloned each time the sequence is evaluated.</remarks> /// <param name="apiCall">The API call made each time a page is required.</param> /// <param name="request">The initial request.</param> /// <param name="callSettings">The settings to apply to each API call.</param> public GrpcPagedAsyncEnumerable(ApiCall <TRequest, TResponse> apiCall, TRequest request, CallSettings callSettings) { _pages = new ResponseAsyncEnumerable <TRequest, TResponse, TResource>(apiCall, request, callSettings); }
/// <summary> /// Creates a new lazily-evaluated sequence from the given API call, initial request, and call settings. /// </summary> /// <remarks>The request is cloned each time the sequence is evaluated.</remarks> /// <param name="apiCall">The API call made each time a page is required.</param> /// <param name="request">The initial request.</param> /// <param name="callSettings">The settings to apply to each API call.</param> public GrpcPagedEnumerable(ApiCall <TRequest, TResponse> apiCall, TRequest request, CallSettings callSettings) { _apiCall = apiCall; _request = request; _callSettings = callSettings; }