Table of Contents

Class MessagePackSerializer.StreamingEnumerationOptions<T, TElement>

Namespace
Nerdbank.MessagePack
Assembly
Nerdbank.MessagePack.dll

Options for streaming a sequence of values from a msgpack stream.

public record MessagePackSerializer.StreamingEnumerationOptions<T, TElement> : IEquatable<MessagePackSerializer.StreamingEnumerationOptions<T, TElement>>

Type Parameters

T

The envelope type; i.e. the outer-most structure that contains the sequence.

TElement

The type of element to be enumerated.

Inheritance
MessagePackSerializer.StreamingEnumerationOptions<T, TElement>
Implements
Inherited Members

Constructors

StreamingEnumerationOptions(Expression<Func<T, IEnumerable<TElement>>>)

Options for streaming a sequence of values from a msgpack stream.

public StreamingEnumerationOptions(Expression<Func<T, IEnumerable<TElement>>> Path)

Parameters

Path Expression<Func<T, IEnumerable<TElement>>>

The path leading from the envelope type T to the sequence of TElement values.

Properties

EmptySequenceForUndiscoverablePath

Gets a value indicating whether to produce an empty sequence if Path does not lead to a sequence (due to a missing property or null value) in the msgpack data.

public bool EmptySequenceForUndiscoverablePath { get; init; }

Property Value

bool

Remarks

When this value is false, a MessagePackSerializationException is thrown when Path does not lead to a sequence.

LeaveOpen

Gets a value indicating whether the PipeReader should be left open after the enumeration completes.

public bool LeaveOpen { get; init; }

Property Value

bool

Remarks

When false, CompleteAsync(Exception) will be called at the conclusion of enumeration.

Path

The path leading from the envelope type T to the sequence of TElement values.

public Expression<Func<T, IEnumerable<TElement>>> Path { get; init; }

Property Value

Expression<Func<T, IEnumerable<TElement>>>