Interface ICommandHandler

Namespace
Cratis.Arc.Commands
Assembly
Cratis.Arc.Core.dll

Defines a handler for processing command response values.

public interface ICommandHandler
Extension Methods

Properties

AllowsAnonymousAccess

Gets a value indicating whether anonymous access is allowed for this command.

bool AllowsAnonymousAccess { get; }

Property Value

bool

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.

Parameters

Gets the parameters of the handler's handle method.

IEnumerable<ParameterInfo> Parameters { get; }

Property Value

IEnumerable<ParameterInfo>

Methods

Handle(CommandContext)

Handles the given command.

ValueTask<object?> Handle(CommandContext commandContext)

Parameters

commandContext CommandContext

The context for the command being handled.

Returns

ValueTask<object>

Response from handling the command.