/// <summary> /// Executes a PartitionQuery RPC asynchronously. /// </summary> /// <param name="request">The partitioning request. Must not be null. The request will be modified with session details /// from this object.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A task representing the asynchronous operation. When the task completes, the result is the response from the RPC.</returns> public Task <PartitionResponse> PartitionQueryAsync(PartitionQueryRequest request, CallSettings callSettings) { CheckNotDisposed(); GaxPreconditions.CheckNotNull(request, nameof(request)); GaxPreconditions.CheckState(TransactionId != null, "Cannot call PartitionQueryAsync with no associated transaction"); request.SessionAsSessionName = SessionName; request.Transaction = new TransactionSelector { Id = TransactionId }; return(RecordSuccessAndExpiredSessions(Client.PartitionQueryAsync(request, callSettings))); }
/// <summary> /// Executes a PartitionQuery RPC asynchronously. /// </summary> /// <param name="request">The partitioning request. Must not be null. The request will be modified with session details /// from this object.</param> /// <param name="timeoutSeconds">The timeout for this RPC, in seconds.</param> /// <param name="cancellationToken">An optional token for canceling the call.</param> /// <returns>A task representing the asynchronous operation. When the task completes, the result is the response from the RPC.</returns> public Task <PartitionResponse> PartitionQueryAsync(PartitionQueryRequest request, int timeoutSeconds, CancellationToken cancellationToken) { CheckNotDisposed(); GaxPreconditions.CheckNotNull(request, nameof(request)); GaxPreconditions.CheckState(TransactionId != null, "Cannot call PartitionQueryAsync with no associated transaction"); request.SessionAsSessionName = SessionName; request.Transaction = new TransactionSelector { Id = TransactionId }; var settings = CreateSettings(Client.Settings.PartitionQuerySettings, timeoutSeconds, cancellationToken); return(RecordSuccessAndExpiredSessions(Client.PartitionQueryAsync(request, settings))); }
partial void Modify_PartitionQueryRequest(ref PartitionQueryRequest request, ref CallSettings settings) => ApplyResourcePrefixHeaderFromSession(ref settings, request.Session);
/// <summary> /// Executes a PartitionQuery RPC asynchronously. /// </summary> /// <param name="request">The partitioning request. Must not be null. The request will be modified with session details /// from this object.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A task representing the asynchronous operation. When the task completes, the result is the response from the RPC.</returns> public Task <PartitionResponse> PartitionQueryAsync(PartitionQueryRequest request, CallSettings callSettings) => PartitionReadOrQueryAsync(PartitionReadOrQueryRequest.FromRequest(request), callSettings);