Class ForwardingCallInvoker<TSourceRequest> (4.3.1)

public static class ForwardingCallInvoker<TSourceRequest> where TSourceRequest : class

Non-generic static class just for generic type inference, to make it easier to construct instances of Google.Api.Gax.Grpc.ForwardingCallInvoker`4.

Inheritance

object > ForwardingCallInvoker<TSourceRequest>

Namespace

GoogleGoogle.ApiGaxGrpc

Assembly

Google.Api.Gax.Grpc.dll

Type Parameter

NameDescription
TSourceRequest

The type of the expected source request. Specifying this explicitly is usually sufficient to allow type inference to work for generic methods within this class.

Methods

Create<TSourceResponse, TTargetRequest, TTargetResponse>(CallInvoker, string, Method<TTargetRequest, TTargetResponse>, Func<TSourceRequest, TTargetRequest>, Func<TSourceRequest, TTargetResponse, TSourceResponse>)

public static CallInvoker Create<TSourceResponse, TTargetRequest, TTargetResponse>(CallInvoker originalInvoker, string sourceMethodFullName, Method<TTargetRequest, TTargetResponse> targetMethod, Func<TSourceRequest, TTargetRequest> requestConverter, Func<TSourceRequest, TTargetResponse, TSourceResponse> responseConverter) where TSourceResponse : class where TTargetRequest : class where TTargetResponse : class

Creates a Google.Api.Gax.Grpc.ForwardingCallInvoker`4 to forward a single unary call to a method in an existing .

Parameters
NameDescription
originalInvokerCallInvoker

The original invoker that will handle the request.

sourceMethodFullNamestring

The full name (as reported by ) of the method to forward.

targetMethodMethod<, >

The target method to call on originalInvoker.

requestConverterFunc

A delegate to convert source requests to target requests.

responseConverterFunc

A delegate to convert target responses to source responses, with additional context being provided from the original source request.

Returns
TypeDescription
CallInvoker

A call invoker forwarding the specified call.

Type Parameters
NameDescription
TSourceResponse

The type of the source response, i.e. the response we expect to return to the caller at the end of the method.

TTargetRequest

The type of the target request, i.e. the request we'll forward on to originalInvoker.

TTargetResponse

The type of the target response, i.e. the response we expect to be returned by originalInvoker.