/// <summary> /// Executes a PartitionRead 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> internal Task <PartitionResponse> PartitionReadOrQueryAsync(PartitionReadOrQueryRequest request, CallSettings callSettings) { CheckNotDisposed(); GaxPreconditions.CheckNotNull(request, nameof(request)); GaxPreconditions.CheckState(TransactionId != null, "Cannot call PartitionReadOrQueryAsync with no associated transaction"); request.SessionAsSessionName = SessionName; request.Transaction = new TransactionSelector { Id = TransactionId }; return(RecordSuccessAndExpiredSessions(request.PartitionAsync(Client, 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="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);