<PackageReference Include="Grpc.Core.Api" Version="2.76.0" />

Grpc.Core.AsyncClientStreamingCall<TRequest, TResponse>

public sealed class AsyncClientStreamingCall<TRequest, TResponse> : IDisposable
Return type for client streaming calls.
public IClientStreamWriter<TRequest> RequestStream { get; }

Async stream to send streaming requests.

public Task<TResponse> ResponseAsync { get; }

Asynchronous call result.

Asynchronous access to response headers.

public AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> responseAsync, Task<Metadata> responseHeadersAsync, Func<Status> getStatusFunc, Func<Metadata> getTrailersFunc, Action disposeAction)

Creates a new AsyncClientStreamingCall object with the specified properties.

public AsyncClientStreamingCall(IClientStreamWriter<TRequest> requestStream, Task<TResponse> responseAsync, Func<object, Task<Metadata>> responseHeadersAsync, Func<object, Status> getStatusFunc, Func<object, Metadata> getTrailersFunc, Action<object> disposeAction, object state)

Creates a new AsyncClientStreamingCall object with the specified properties.

public ConfiguredTaskAwaitable<TResponse> ConfigureAwait(bool continueOnCapturedContext)

Configures an awaiter used to await this AsyncClientStreamingCall<T, U>.

public void Dispose()

Provides means to cleanup after the call. If the call has already finished normally (request stream has been completed and call result has been received), doesn't do anything. Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. As a result, all resources being used by the call should be released eventually.

public TaskAwaiter<TResponse> GetAwaiter()

Gets an awaiter used to await this AsyncClientStreamingCall<T, U>.

public Status GetStatus()

Gets the call status if the call has already finished. Throws InvalidOperationException otherwise.

Gets the call trailing metadata if the call has already finished. Throws InvalidOperationException otherwise.