Show / Hide Table of Contents

Class Mediator

Default mediator implementation relying on single- and multi instance delegates for resolving handlers.

Inheritance
Object
Mediator
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
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.

Implements
IPublisher.PublishAsync(IEvent[], CancellationToken)

Extension Methods

ObjectExtensions.DeepClone<T>(T)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX