Show / Hide Table of Contents

    Class GrpcHttpClientBuilderExtensions

    Extension methods for configuring an .

    Inheritance
    System.Object
    GrpcHttpClientBuilderExtensions
    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 that can be used to configure the client.

    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 that can be used to configure the client.

    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 that can be used to configure the client.

    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 that can be used to configure the client.

    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 that can be used to configure the client.

    Back to top Generated by DocFX