Interface IEventExchange
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
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
TypeEvent 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
TypeEvent 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
TypeEvent type.
result
IEventStreamout parameter that returns the registered IEventStream instance.
Returns
- bool
true when event stream exists, otherwise false.