Class GrpcHttpClientBuilderExtensions
Extension methods for configuring an
Inheritance
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Grpc.Net.ClientFactory.dll
Syntax
public static class GrpcHttpClientBuilderExtensions : object
Methods
AddInterceptor(IHttpClientBuilder, Func<Interceptor>)
Adds a delegate that will be used to create an additional inteceptor for a gRPC client.
Declaration
public static IHttpClientBuilder AddInterceptor(this IHttpClientBuilder builder, Func<Interceptor> configureInvoker)
Parameters
Type | Name | Description |
---|---|---|
IHttpClientBuilder | builder | The |
Func<Interceptor> | configureInvoker | A delegate that is used to create an |
Returns
Type | Description |
---|---|
IHttpClientBuilder | An |
AddInterceptor(IHttpClientBuilder, Func<IServiceProvider, Interceptor>)
Adds a delegate that will be used to create an additional inteceptor for a gRPC client.
Declaration
public static IHttpClientBuilder AddInterceptor(this IHttpClientBuilder builder, Func<IServiceProvider, Interceptor> configureInvoker)
Parameters
Type | Name | Description |
---|---|---|
IHttpClientBuilder | builder | The |
Func<IServiceProvider, Interceptor> | configureInvoker | A delegate that is used to create an |
Returns
Type | Description |
---|---|
IHttpClientBuilder | An |
AddInterceptor<TInterceptor>(IHttpClientBuilder)
Adds an additional interceptor from the dependency injection container for a gRPC client.
Declaration
public static IHttpClientBuilder AddInterceptor<TInterceptor>(this IHttpClientBuilder builder)
where TInterceptor : Interceptor
Parameters
Type | Name | Description |
---|---|---|
IHttpClientBuilder | builder | The |
Returns
Type | Description |
---|---|
IHttpClientBuilder | An |
Type Parameters
Name | Description |
---|---|
TInterceptor | The type of the |
ConfigureChannel(IHttpClientBuilder, Action<GrpcChannelOptions>)
Adds a delegate that will be used to configure the channel for a gRPC client.
Declaration
public static IHttpClientBuilder ConfigureChannel(this IHttpClientBuilder builder, Action<GrpcChannelOptions> configureChannel)
Parameters
Type | Name | Description |
---|---|---|
IHttpClientBuilder | builder | The |
Action<GrpcChannelOptions> | configureChannel | A delegate that is used to configure a GrpcChannelOptions. |
Returns
Type | Description |
---|---|
IHttpClientBuilder | An |
ConfigureChannel(IHttpClientBuilder, Action<IServiceProvider, GrpcChannelOptions>)
Adds a delegate that will be used to configure the channel for a gRPC client.
Declaration
public static IHttpClientBuilder ConfigureChannel(this IHttpClientBuilder builder, Action<IServiceProvider, GrpcChannelOptions> configureChannel)
Parameters
Type | Name | Description |
---|---|---|
IHttpClientBuilder | builder | The |
Action<IServiceProvider, GrpcChannelOptions> | configureChannel | A delegate that is used to configure a GrpcChannelOptions. |
Returns
Type | Description |
---|---|
IHttpClientBuilder | An |