Table of Contents

Interface IIceFeature

Namespace
IceRpc.Features
Assembly
IceRpc.Ice.dll

Represents a feature used to customize the encoding and decoding of request and response payloads.

public interface IIceFeature

Properties

Activator

Gets the activator to use when decoding Ice-encoded classes and exceptions.

IActivator? Activator { get; }

Property Value

IActivator

The activator. When null, the decoding of a request or response payload uses the activator injected by the generated code.

BaseProxy

Gets the base proxy used when decoding a service address into a proxy.

IIceProxy? BaseProxy { get; }

Property Value

IIceProxy

The base proxy. A decoded proxy inherits the invoker and encode options of the base proxy. When null, the proxy that sent the request serves as the base proxy for a proxy decoded from an incoming response, while a proxy decoded from an incoming request receives Instance as its invoker.

EncodeOptions

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

IceEncodeOptions? EncodeOptions { get; }

Property Value

IceEncodeOptions

The Ice encode options. null is equivalent to Default.

MaxCollectionAllocation

Gets the maximum collection allocation when decoding a payload, in bytes.

int MaxCollectionAllocation { get; }

Property Value

int

The maximum collection allocation.

Remarks

This value is a cumulative budget for the decoding of one payload, not a limit on the size of each collection: the decoder charges the estimated memory size of each string, sequence, and dictionary against this budget before decoding it, based on the size or element count found in the encoded data, and throws InvalidDataException when the charge exceeds the remaining budget. Implementations must return a value greater than or equal to 0.

MaxDepth

Gets the maximum depth when decoding a class recursively.

int MaxDepth { get; }

Property Value

int

The maximum depth.

Remarks

Implementations must return a value greater than 0.

MaxPayloadSize

Gets the maximum size of an Ice-encoded payload, in bytes. An Ice-encoded payload corresponds to the encoded arguments of an operation, the encoded return values of an operation, or the encoded Ice exception carried by a response with status code ApplicationError.

int MaxPayloadSize { get; }

Property Value

int

The maximum size of an Ice-encoded payload, in bytes.

Remarks

This limit applies only when decoding the payload of an incoming request or response: the decoding throws InvalidDataException when the payload size carried by the request or response exceeds this maximum, before decoding any byte of the payload. It does not restrict the size of the payloads encoded by the application. The payload size does not include the size of any header for this payload, such as the encapsulation header with the ice protocol. Implementations must return a value greater than or equal to 0 and less than MaxValue.