InMemoryEventSink
Namespace: SnowBank.Messaging.Events · class
Implements: IEventSink
Implementation of a Job Event Log that keeps all events in memory, mostly intended for unit testing
Constructors
InMemoryEventSink
InMemoryEventSink(IEventFilter filter)
InMemoryEventSink(IEventFilter filter, IEnumerable<IEvent> initialEvents)
Properties
Async
bool Async { get; }
If true, this event sinks requires async dispatching. If false, it will always run inline and will not block the calling thread
Methods
Copy
InMemoryEventSink Copy()
Create
static InMemoryEventSink Create(IEventFilter filter = null)
Dispatch
Task Dispatch(IEvent evt, CancellationToken ct)
Dispatch an event to this log sink
Task Dispatch(ReadOnlyMemory<IEvent> batch, CancellationToken ct)
Dispatch a batch of events to this log sink
GetAllEvents
IReadOnlyList<IEvent> GetAllEvents()