Table of Contents

Struct MessageBrokerChannelCollection

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

Represents a collection of MessageBrokerChannel instances.

public readonly struct MessageBrokerChannelCollection
Inherited Members

Properties

Count

Specifies the number of owned channels.

public int Count { get; }

Property Value

int

Methods

GetAll()

Returns all owned channels.

[Pure]
public ReadOnlyArray<MessageBrokerChannel> GetAll()

Returns

ReadOnlyArray<MessageBrokerChannel>

All owned channels.

TryGetById(int)

Attempts to return a channel with the provided id.

[Pure]
public MessageBrokerChannel? TryGetById(int id)

Parameters

id int

Channel's unique Id.

Returns

MessageBrokerChannel

MessageBrokerChannel instance associated with the provided id or null, when such a channel does not exist.

TryGetByName(string)

Attempts to return a channel with the provided name.

[Pure]
public MessageBrokerChannel? TryGetByName(string name)

Parameters

name string

Channel's unique Name.

Returns

MessageBrokerChannel

MessageBrokerChannel instance associated with the provided name or null, when such a channel does not exist.