Table of Contents

Interface ICommandHandlerProvider

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

Defines a provider for command handlers.

public interface ICommandHandlerProvider

Properties

Handlers

Gets the collection of command handlers.

IEnumerable<ICommandHandler> Handlers { get; }

Property Value

IEnumerable<ICommandHandler>

Methods

TryGetHandlerFor(object, out ICommandHandler?)

Tries to get a handler for the given command.

bool TryGetHandlerFor(object command, out ICommandHandler? handler)

Parameters

command object

Command to handle.

handler ICommandHandler

Handler for the command, if found.

Returns

bool

True if a handler was found; otherwise, false.