Table of Contents

Class SliceFeature

Namespace
IceRpc.Features
Assembly
IceRpc.Slice.dll

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

encodeOptions SliceEncodeOptions

The encode options.

maxCollectionAllocation int

The maximum collection allocation. Use -1 to get the default value: 8 times maxSegmentSize if set, otherwise the value provided by defaultFeature.

maxSegmentSize int

The maximum segment size. Use -1 to get the default value.

baseProxy ISliceProxy

The base proxy, used when decoding service addresses into proxies.

defaultFeature ISliceFeature

A 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

ISliceFeature

EncodeOptions

Gets the options to use when encoding the payload of an outgoing response.

public SliceEncodeOptions? EncodeOptions { get; }

Property Value

SliceEncodeOptions

The Slice encode options. null is equivalent to Default.

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 1 MB.