Class EnumerableEventSource<TEvent>
Represents a generic disposable event source that can be listened to, that notifies its listeners immediately with all stored events sequentially, and then disposes the listener.
public sealed class EnumerableEventSource<TEvent> : EventSource<TEvent>, IEventSource<TEvent>, IEventStream<TEvent>, IEventSource, IEventStream, IDisposable
Type Parameters
TEvent
Event type.
- Inheritance
-
EventSource<TEvent>EnumerableEventSource<TEvent>
- Implements
-
IEventSource<TEvent>IEventStream<TEvent>
- Inherited Members
- Extension Methods
Methods
OnDispose()
Allows to provide custom disposal implementation.
protected override void OnDispose()
OnSubscriberAdded(IEventSubscriber, IEventListener<TEvent>)
Allows to react to attachment of a new event subscriber.
protected override void OnSubscriberAdded(IEventSubscriber subscriber, IEventListener<TEvent> listener)
Parameters
subscriber
IEventSubscriberAttached event subscriber.
listener
IEventListener<TEvent>Event listener attached to the event subscriber.