Class GrpcServiceOptions
Options used to configure service instances.
Namespace: Grpc.AspNetCore.Server
Assembly: Grpc.AspNetCore.Server.dll
Syntax
public class GrpcServiceOptions : object
Properties
CompressionProviders
Gets or sets the list of compression providers used to compress and decompress gRPC messages.
Declaration
public IList<ICompressionProvider> CompressionProviders { get; set; }
Property Value
Type | Description |
---|---|
IList<ICompressionProvider> |
EnableDetailedErrors
Gets or sets a value indicating whether detailed error messages are sent to the peer. Detailed error messages include details from exceptions thrown on the server.
Declaration
public bool? EnableDetailedErrors { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Interceptors
Get a collection of interceptors to be executed with every call. Interceptors are executed in order.
Declaration
public InterceptorCollection Interceptors { get; }
Property Value
Type | Description |
---|---|
InterceptorCollection |
MaxReceiveMessageSize
Gets or sets the maximum message size in bytes that can be received by the server.
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 server.
Declaration
public int? MaxSendMessageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
ResponseCompressionAlgorithm
Gets or sets the compression algorithm used to compress messages sent from the server. The request grpc-accept-encoding header value must contain this algorithm for it to be used.
Declaration
public string? ResponseCompressionAlgorithm { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
ResponseCompressionLevel
Gets or sets the compression level used to compress messages sent from the server. The compression level will be passed to the compression provider.
Declaration
public CompressionLevel? ResponseCompressionLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<CompressionLevel> |