Table of Contents

Interface IEventExchange

Namespace
LfrlAnvil.Reactive.Exchanges
Assembly
LfrlAnvil.Reactive.Core.dll

Represents a collection of event streams identifiable by their event types.

public interface IEventExchange
Extension Methods

Properties

IsDisposed

Specifies whether or not this event exchange has been disposed.

bool IsDisposed { get; }

Property Value

bool

Methods

GetRegisteredEventTypes()

Returns a collection of event types of all currently registered event streams.

[Pure]
IEnumerable<Type> GetRegisteredEventTypes()

Returns

IEnumerable<Type>

New IEnumerable<T> instance.

GetStream(Type)

Returns an event stream associated with the provided eventType.

[Pure]
IEventStream GetStream(Type eventType)

Parameters

eventType Type

Event type.

Returns

IEventStream

Registered IEventStream instance.

Exceptions

EventPublisherNotFoundException

When event stream does not exist.

IsRegistered(Type)

Checks whether or not an event stream for the provided eventType exists.

[Pure]
bool IsRegistered(Type eventType)

Parameters

eventType Type

Event type to check.

Returns

bool

true when event stream exists, otherwise false.

TryGetStream(Type, out IEventStream)

Attempts to return an event stream associated with the provided eventType.

bool TryGetStream(Type eventType, out IEventStream result)

Parameters

eventType Type

Event type.

result IEventStream

out parameter that returns the registered IEventStream instance.

Returns

bool

true when event stream exists, otherwise false.