Table of Contents

Struct MessageBrokerStreamMessageCollection

Namespace
LfrlAnvil.MessageBroker.Server
Assembly
LfrlAnvil.MessageBroker.Server.dll

Represents a collection of messages stored in a MessageBrokerStream.

public readonly struct MessageBrokerStreamMessageCollection
Inherited Members

Properties

Count

Number of stored messages.

public int Count { get; }

Property Value

int

Methods

TryGetByKey(int, bool)

Attempts to retrieve a message from the store by its store key.

[Pure]
public MessageBrokerStreamMessage? TryGetByKey(int key, bool includeData = false)

Parameters

key int

Store key of the message to retrieve.

includeData bool

Specifies whether to include a copy of binary data. Equal to false by default.

Returns

MessageBrokerStreamMessage?

MessageBrokerStreamMessage instance associated with the given store key or null if such a message doesn't exist.