Table of Contents

Class CommandMiddleware

Namespace
Signal.Application.Commands
Assembly
Signal.Application.dll

Last built-in pipeline step: parses prefixed text messages, executes the matching command, marks the message as handled and passes the outcome to ICommandResultHandler. Reactions are never treated as commands.

public sealed class CommandMiddleware : IMessageMiddleware
Inheritance
CommandMiddleware
Implements
Inherited Members

Constructors

CommandMiddleware(ICommandParser, ICommandExecutor, ICommandResultHandler)

Last built-in pipeline step: parses prefixed text messages, executes the matching command, marks the message as handled and passes the outcome to ICommandResultHandler. Reactions are never treated as commands.

public CommandMiddleware(ICommandParser parser, ICommandExecutor executor, ICommandResultHandler results)

Parameters

parser ICommandParser

The command parser.

executor ICommandExecutor

The command executor.

results ICommandResultHandler

The result handler.

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.