Table of Contents

Class CommandResponseValueHandlers

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

Represents an implementation of ICommandResponseValueHandlers.

[Singleton]
public class CommandResponseValueHandlers : ICommandResponseValueHandlers
Inheritance
CommandResponseValueHandlers
Implements
Inherited Members
Extension Methods

Constructors

CommandResponseValueHandlers(IInstancesOf<ICommandResponseValueHandler>)

Represents an implementation of ICommandResponseValueHandlers.

public CommandResponseValueHandlers(IInstancesOf<ICommandResponseValueHandler> handlers)

Parameters

handlers IInstancesOf<ICommandResponseValueHandler>

The available ICommandResponseValueHandler.

Methods

CanHandle(CommandContext, object)

Determines whether any handler can handle the given value.

public 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.

public 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.