Class SliceFeature
Default implementation of ISliceFeature.
public sealed class SliceFeature : ISliceFeature
- Inheritance
-
SliceFeature
- Implements
- Inherited Members
Constructors
SliceFeature(SliceEncodeOptions?, int, int, ISliceProxy?, ISliceFeature?)
Constructs a Slice feature.
public SliceFeature(SliceEncodeOptions? encodeOptions = null, int maxCollectionAllocation = -1, int maxSegmentSize = -1, ISliceProxy? baseProxy = null, ISliceFeature? defaultFeature = null)
Parameters
encodeOptionsSliceEncodeOptionsThe encode options.
maxCollectionAllocationintThe maximum collection allocation. Use
-1to get the default value: 8 timesmaxSegmentSizeif set, otherwise the value provided bydefaultFeature.maxSegmentSizeintThe maximum segment size. Use
-1to get the default value.baseProxyISliceProxyThe base proxy, used when decoding service addresses into proxies.
defaultFeatureISliceFeatureA feature that provides default values for all parameters. null is equivalent to Default.
Properties
BaseProxy
Gets the base proxy used when decoding a service address into a proxy.
public ISliceProxy? BaseProxy { get; }
Property Value
- ISliceProxy
The base proxy.
Default
Gets a ISliceFeature with default values for all properties.
public static ISliceFeature Default { get; }
Property Value
EncodeOptions
Gets the options to use when encoding the payload of an outgoing response.
public SliceEncodeOptions? EncodeOptions { get; }
Property Value
MaxCollectionAllocation
Gets the maximum collection allocation when decoding a payload, in bytes.
public int MaxCollectionAllocation { get; }
Property Value
- int
The maximum collection allocation.
MaxSegmentSize
Gets the maximum size of a Slice payload segment, in bytes. A Slice payload segment corresponds to the encoded arguments of an operation, the encoded return values of an operation, or a portion of a stream of variable-size elements.
public int MaxSegmentSize { get; }
Property Value
- int
The maximum segment size. Defaults to
1MB.