Class ProtobufFeature
Default implementation of IProtobufFeature.
public sealed class ProtobufFeature : IProtobufFeature
- Inheritance
-
ProtobufFeature
- Implements
- Inherited Members
Constructors
ProtobufFeature(int, ProtobufEncodeOptions?, IProtobufFeature?)
Constructs a Protobuf feature.
public ProtobufFeature(int maxMessageLength = -1, ProtobufEncodeOptions? encodeOptions = null, IProtobufFeature? defaultFeature = null)
Parameters
maxMessageLengthintThe maximum message length. Use
-1to get the default value.encodeOptionsProtobufEncodeOptionsThe encode options.
defaultFeatureIProtobufFeatureA feature that provides default values for all parameters. null is equivalent to Default.
Properties
Default
Gets a IProtobufFeature with default values for all properties.
public static IProtobufFeature Default { get; }
Property Value
EncodeOptions
Gets the options to use when encoding the payload of an outgoing response.
public ProtobufEncodeOptions? EncodeOptions { get; }
Property Value
MaxMessageLength
Gets the maximum length of an encoded Protobuf message, in bytes.
public int MaxMessageLength { get; }
Property Value
- int
The maximum length of a Protobuf message. Defaults to
1MB.