Struct ClientInterceptorContext<TRequest, TResponse> (2.63.0)

public struct ClientInterceptorContext<TRequest, TResponse> where TRequest : class where TResponse : class

Carries along the context associated with intercepted invocations on the client side.

Namespace

Grpc.Core.Interceptors

Assembly

Grpc.Core.Api.dll

Type Parameters

Name Description
TRequest
TResponse

Constructors

ClientInterceptorContext(Method<TRequest, TResponse>, string?, CallOptions)

public ClientInterceptorContext(Method<TRequest, TResponse> method, string? host, CallOptions options)

Creates a new instance of ClientInterceptorContext<TRequest, TResponse> with the specified method, host, and call options.

Parameters
Name Description
method Method

A Method<TRequest, TResponse> object representing the method to be invoked.

host string

The host to dispatch the current call to.

options CallOptions

A CallOptions instance containing the call options of the current call.

Properties

Host

public readonly string? Host { get; }

Gets the host that the currect invocation will be dispatched to.

Property Value
Type Description
string

Method

public readonly Method<TRequest, TResponse> Method { get; }

Gets the Method<TRequest, TResponse> instance representing the method to be invoked.

Property Value
Type Description
Method

Options

public readonly CallOptions Options { get; }

Gets the CallOptions structure representing the call options associated with the current invocation.

Property Value
Type Description
CallOptions