Table of Contents

Class DomainEventMiddleware

Namespace
Signal.Application.Pipeline
Assembly
Signal.Application.dll

Publishes the envelope's domain event (ToDomainEvent()) to all registered IEventHandler<TEvent>s, then continues with command handling.

public sealed class DomainEventMiddleware : IMessageMiddleware
Inheritance
DomainEventMiddleware
Implements
Inherited Members

Constructors

DomainEventMiddleware(IDomainEventDispatcher)

Publishes the envelope's domain event (ToDomainEvent()) to all registered IEventHandler<TEvent>s, then continues with command handling.

public DomainEventMiddleware(IDomainEventDispatcher dispatcher)

Parameters

dispatcher IDomainEventDispatcher

The event dispatcher of the message scope.

Methods

InvokeAsync(MessageContext, MessageDelegate)

Processes the message. Call next to continue; skip it to stop processing.

public Task InvokeAsync(MessageContext context, MessageDelegate next)

Parameters

context MessageContext

The message being processed.

next MessageDelegate

The rest of the pipeline.

Returns

Task

A task that completes when this step (and everything it invoked) has finished.