Class DomainEventDispatcherExtensions
- Namespace
- Savvyio.Domain
- Assembly
- Savvyio.Domain.dll
Extension methods for the IDomainEventDispatcher interface.
public static class DomainEventDispatcherExtensions
- Inheritance
-
ObjectDomainEventDispatcherExtensions
Methods
RaiseMany<T>(IDomainEventDispatcher, IAggregateRoot<T>)
Raises domain events from the specified aggregate
to handlers that implements the IDomainEventHandler interface.
public static void RaiseMany<T>(this IDomainEventDispatcher dispatcher, IAggregateRoot<T> aggregate)
where T : IDomainEvent
Parameters
dispatcher
IDomainEventDispatcherThe IDomainEventDispatcher to extend.
aggregate
IAggregateRoot<T>The aggregate to publish domain events from.
Type Parameters
T
The type that implements the IDomainEvent interface.
RaiseManyAsync<T>(IDomainEventDispatcher, IAggregateRoot<T>, Action<AsyncOptions>)
Asynchronously raises domain events from the specified aggregate
to handlers that implements the IDomainEventHandler interface.
public static async Task RaiseManyAsync<T>(this IDomainEventDispatcher dispatcher, IAggregateRoot<T> aggregate, Action<AsyncOptions> setup = null)
where T : IDomainEvent
Parameters
dispatcher
IDomainEventDispatcherThe IDomainEventDispatcher to extend.
aggregate
IAggregateRoot<T>The aggregate to publish domain events from.
setup
Action<AsyncOptions>The AsyncOptions which may be configured.
Returns
- Task
A System.Threading.Tasks.Task that represents the asynchronous operation.
Type Parameters
T
The type that implements the IDomainEvent interface.