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
TEventEvent type.
- Inheritance
-
EventSource<ReadOnlyMemory<TEvent>>CombineEventSource<TEvent>
- Implements
-
IEventSource<ReadOnlyMemory<TEvent>>IEventStream<ReadOnlyMemory<TEvent>>
- Inherited Members
- Extension Methods
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OverrideListenerUnsafe(IEventSubscriber, IEventListener<ReadOnlyMemory<TEvent>>)
Allows to override an event listener.
protected override IEventListener<ReadOnlyMemory<TEvent>> OverrideListenerUnsafe(IEventSubscriber subscriber, IEventListener<ReadOnlyMemory<TEvent>> listener)
Parameters
subscriberIEventSubscriberEvent subscriber.
listenerIEventListener<ReadOnlyMemory<TEvent>>Event listener to override.
Returns
- IEventListener<ReadOnlyMemory<TEvent>>
IEventListener<TEvent> instance.
Remarks
This method call is not thread-safe by default.