Class ServerStreamingBase<TResponse> (4.0.0)

Stay organized with collections Save and categorize content based on your preferences.
public class ServerStreamingBase<TResponse>

Base class for server streaming RPC methods.

Inheritance

Object > ServerStreamingBase<TResponse>

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Type Parameter

NameDescription
TResponse

RPC streaming response type

Properties

GrpcCall

public virtual AsyncServerStreamingCall<TResponse> GrpcCall { get; }

The underlying gRPC duplex streaming call.

Property Value
TypeDescription
AsyncServerStreamingCall<TResponse>

Methods

GetResponseStream()

public virtual AsyncResponseStream<TResponse> GetResponseStream()

Async stream to read streaming responses, exposed as an async sequence. The default implementation will use GrpcCall to extract a response stream, and adapt it to AsyncResponseStream<TResponse>.

Returns
TypeDescription
AsyncResponseStream<TResponse>
Remarks

If this method is called more than once, all the returned enumerators will be enumerating over the same underlying response stream, which may cause confusion. Additionally, the sequence returned by this method can only be iterated over a single time. Attempting to iterate more than once will cause an InvalidOperationException.