Table of Contents

Interface ICommandHandler

Namespace
Cratis.Applications.Commands
Assembly
Cratis.Applications.dll

Defines a handler for processing command response values.

public interface ICommandHandler

Properties

CommandType

Gets the type of command the handler can handle.

Type CommandType { get; }

Property Value

Type

Dependencies

Gets the dependencies required by the handler.

IEnumerable<Type> Dependencies { get; }

Property Value

IEnumerable<Type>

Location

Gets the location the command is at.

IEnumerable<string> Location { get; }

Property Value

IEnumerable<string>

Remarks

This is used to determine which handler should handle a given command based on its location.

Methods

Handle(CommandContext)

Handles the given command.

Task<object?> Handle(CommandContext commandContext)

Parameters

commandContext CommandContext

The context for the command being handled.

Returns

Task<object>

Response from handling the command.