Table of Contents

Interface ICommandResponseValueHandlers

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

Defines a system that knows about ICommandResponseValueHandler and can use them to handle response values.

public interface ICommandResponseValueHandlers
Extension Methods

Methods

CanHandle(CommandContext, object)

Determines whether any handler can handle the given value.

bool CanHandle(CommandContext context, object value)

Parameters

context CommandContext

The CommandContext for the command that produced the value.

value object

Value to evaluate.

Returns

bool

True if any handler can handle the value, false otherwise.

Handle(CommandContext, object)

Handles the given value.

Task<CommandResult> Handle(CommandContext context, object value)

Parameters

context CommandContext

The CommandContext for the command that produced the value.

value object

Value to handle.

Returns

Task<CommandResult>

CommandResult representing the result of handling the value.