Class CombineEventSource<TEvent>
Represents a generic disposable event source that can be listened to, that notifies its listeners when any of the inner event streams publishes an event, with a sequence of last events published by inner event streams. First event will be published once all inner event streams publish at least one event. Event listeners will be disposed when all inner event streams get disposed or when the first event has not been published yet and any of the inner streams gets disposed.
public sealed class CombineEventSource<TEvent> : EventSource<ReadOnlyMemory<TEvent>>, IEventSource<ReadOnlyMemory<TEvent>>, IEventStream<ReadOnlyMemory<TEvent>>, IEventSource, IEventStream, IDisposable
Type Parameters
TEvent
Event type.
- Inheritance
-
EventSource<ReadOnlyMemory<TEvent>>CombineEventSource<TEvent>
- Implements
-
IEventSource<ReadOnlyMemory<TEvent>>IEventStream<ReadOnlyMemory<TEvent>>
- Inherited Members
- Extension Methods
Methods
OnDispose()
Allows to provide custom disposal implementation.
protected override void OnDispose()
OverrideListener(IEventSubscriber, IEventListener<ReadOnlyMemory<TEvent>>)
Allows to override the event listener.
protected override IEventListener<ReadOnlyMemory<TEvent>> OverrideListener(IEventSubscriber subscriber, IEventListener<ReadOnlyMemory<TEvent>> listener)
Parameters
subscriber
IEventSubscriberEvent subscriber.
listener
IEventListener<ReadOnlyMemory<TEvent>>Event listener to override.
Returns
- IEventListener<ReadOnlyMemory<TEvent>>
IEventListener<TEvent> instance.