Class WhenAnyEventSource<TEvent>
Represents a generic disposable event source that can be listened to, that notifies its listeners once any inner event source is disposed, with the last event published by that disposed inner event source, and then disposes the listener.
public sealed class WhenAnyEventSource<TEvent> : EventSource<WithIndex<TEvent>>, IEventSource<WithIndex<TEvent>>, IEventStream<WithIndex<TEvent>>, IEventSource, IEventStream, IDisposable
Type Parameters
TEventEvent type.
- Inheritance
-
EventSource<WithIndex<TEvent>>WhenAnyEventSource<TEvent>
- Implements
-
IEventSource<WithIndex<TEvent>>IEventStream<WithIndex<TEvent>>
- Inherited Members
- Extension Methods
Methods
OnDispose()
Allows to provide custom disposal implementation.
protected override void OnDispose()
OverrideListener(IEventSubscriber, IEventListener<WithIndex<TEvent>>)
Allows to override the event listener.
protected override IEventListener<WithIndex<TEvent>> OverrideListener(IEventSubscriber subscriber, IEventListener<WithIndex<TEvent>> listener)
Parameters
subscriberIEventSubscriberEvent subscriber.
listenerIEventListener<WithIndex<TEvent>>Event listener to override.
Returns
- IEventListener<WithIndex<TEvent>>
IEventListener<TEvent> instance.