Class GrpcChannelOptions
An options class for configuring a GrpcChannel.
Inheritance
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 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
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 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 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 |