Show / Hide Table of Contents

    Class GrpcChannelOptions

    An options class for configuring a GrpcChannel.

    Inheritance
    System.Object
    GrpcChannelOptions
    Namespace: Grpc.Net.Client
    Assembly: Grpc.Net.Client.dll
    Syntax
    public sealed class GrpcChannelOptions : object

    Constructors

    GrpcChannelOptions()

    Initializes a new instance of the GrpcChannelOptions class.

    Declaration
    public GrpcChannelOptions()

    Properties

    CompressionProviders

    Gets or sets a collection of compression providers.

    Declaration
    public IList<ICompressionProvider>? CompressionProviders { get; set; }
    Property Value
    Type Description
    System.Nullable<IList<ICompressionProvider>>

    Credentials

    Gets or sets the credentials for the channel.

    Declaration
    public ChannelCredentials? Credentials { get; set; }
    Property Value
    Type Description
    System.Nullable<ChannelCredentials>

    DisposeHttpClient

    Gets or sets a value indicating whether the underlying should be disposed when the GrpcChannel instance is disposed. The default value is false.

    Declaration
    public bool DisposeHttpClient { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This setting is used when a HttpClient value is specified. If no HttpClient value is provided then the channel will create an instance that is always disposed when the channel is disposed.

    HttpClient

    Gets or sets the HttpClient used by the channel.

    Declaration
    public HttpClient? HttpClient { get; set; }
    Property Value
    Type Description
    System.Nullable<HttpClient>
    Remarks

    By default a specified here will not be disposed with the channel. To dispose the with the channel you must set DisposeHttpClient to true.

    LoggerFactory

    Gets or sets the logger factory used by the channel.

    Declaration
    public ILoggerFactory? LoggerFactory { get; set; }
    Property Value
    Type Description
    System.Nullable<ILoggerFactory>

    MaxReceiveMessageSize

    Gets or sets the maximum message size in bytes that can be received by the client.

    Declaration
    public int? MaxReceiveMessageSize { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    MaxSendMessageSize

    Gets or sets the maximum message size in bytes that can be sent from the client.

    Declaration
    public int? MaxSendMessageSize { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    ThrowOperationCanceledOnCancellation

    Gets or sets a value indicating whether clients will throw for a call when its is triggered or its is exceeded. The default value is false. Note: experimental API that can change or be removed without any prior notice.

    Declaration
    public bool ThrowOperationCanceledOnCancellation { get; set; }
    Property Value
    Type Description
    System.Boolean
    Back to top Generated by DocFX