Class Mediator
Default mediator implementation relying on single- and multi instance delegates for resolving handlers.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.Messaging
Assembly: IRM.dll
Syntax
public class Mediator : IMediator, IPublisher
Constructors
Mediator(IServiceProvider)
Creates a new instance of Mediator.
Declaration
public Mediator(IServiceProvider serviceProvider)
Parameters
System.IServiceProvider
serviceProvider
The System.IServiceProvider used to resolve handlers. |
Methods
PublishAsync(IEvent[], CancellationToken)
Asynchronously publish a collection of events to multiple handlers.
Declaration
public async Task PublishAsync(IEvent[] events, CancellationToken cancellationToken = default(CancellationToken))
Parameters
IEvent[]
events
The collection of IEvent to publish. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task
The System.Threading.Tasks.Task that represents the asynchronous operation. |