Table of Contents

Struct OutgoingFieldValue

Namespace
IceRpc
Assembly
IceRpc.dll

Represents the value of a field that is about to be sent. It's a kind of discriminated union: only one of the struct's properties can be set.

public readonly record struct OutgoingFieldValue : IEquatable<OutgoingFieldValue>
Implements
Inherited Members

Constructors

OutgoingFieldValue(Action<IBufferWriter<byte>>)

Constructs an outgoing field value that holds a write action.

public OutgoingFieldValue(Action<IBufferWriter<byte>> writeAction)

Parameters

writeAction Action<IBufferWriter<byte>>

The action that writes the field value.

OutgoingFieldValue(ReadOnlySequence<byte>)

Constructs an outgoing field value that holds a byte sequence.

public OutgoingFieldValue(ReadOnlySequence<byte> byteSequence)

Parameters

byteSequence ReadOnlySequence<byte>

The field encoded value.

Properties

ByteSequence

Gets the value of this outgoing field.

public ReadOnlySequence<byte> ByteSequence { get; }

Property Value

ReadOnlySequence<byte>

The value of this outgoing field. Defaults to an empty byte sequence.

Remarks

ByteSequence is set when the outgoing field value is constructed with OutgoingFieldValue(ReadOnlySequence<byte>).

WriteAction

Gets the action used to write the field value. This action is executed when the fields are sent.

public Action<IBufferWriter<byte>>? WriteAction { get; }

Property Value

Action<IBufferWriter<byte>>

The write action of this outgoing field. Defaults to null.