4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    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 [ForwardingCallInvoker\<TSourceRequest, TSourceResponse, TTargetRequest, TTargetResponse\>](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ForwardingCallInvoker-4).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ForwardingCallInvoker\<TSourceRequest\>

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Grpc](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.md.txt)

## Assembly

Google.Api.Gax.Grpc.dll

| ## Type Parameter ||
|---|---|
| **Name** | **Description** |
| `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 [ForwardingCallInvoker\<TSourceRequest, TSourceResponse, TTargetRequest, TTargetResponse\>](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ForwardingCallInvoker-4)
to forward a single unary call to a method in an existing [CallInvoker](https://github.com/grpc/grpc-dotnet/blob/7c43ddb5d68008782dc0dba2d0feaa3ed91a9fb2/src/Grpc.Core.Api/CallInvoker.cs).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `originalInvoker` | `CallInvoker` The original invoker that will handle the request. |
| `sourceMethodFullName` | `string` The full name (as reported by [FullName](https://github.com/grpc/grpc-dotnet/blob/7c43ddb5d68008782dc0dba2d0feaa3ed91a9fb2/src/Grpc.Core.Api/Method.cs)) of the method to forward. |
| `targetMethod` | `Method` The target method to call on `originalInvoker`. |
| `requestConverter` | `Func` A delegate to convert source requests to target requests. |
| `responseConverter` | `Func` A delegate to convert target responses to source responses, with additional context being provided from the original source request. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CallInvoker` | A call invoker forwarding the specified call. |

| **Type Parameters** ||
|---|---|
| **Name** | **Description** |
| `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`. |