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
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
keyintStore key of the message to retrieve.
includeDataboolSpecifies whether to include a copy of binary data. Equal to false by default.
Returns
- MessageBrokerStreamMessage?
MessageBrokerStreamMessage instance associated with the given store
keyor null if such a message doesn't exist.