Class CommandHandlerActor
Convenience class for creating actors who handle Commands sent from a Petabridge.Cmd client.
Inheritance
System.Object
CommandHandlerActor
Namespace: Petabridge.Cmd.Host
Assembly: cs.temp.dll.dll
Syntax
public abstract class CommandHandlerActor : ReceiveActor
Constructors
CommandHandlerActor(CommandPalette)
Declaration
protected CommandHandlerActor(CommandPalette commands)
Parameters
Type | Name | Description |
---|---|---|
CommandPalette | commands |
Fields
Commands
The set of commands supported by this actor
Declaration
protected readonly CommandPalette Commands
Field Value
Type | Description |
---|---|
CommandPalette |
Validator
Declaration
protected readonly CommandValidator Validator
Field Value
Type | Description |
---|---|
CommandValidator |
Methods
DoNothing(Command)
Declaration
protected static void DoNothing(Command c)
Parameters
Type | Name | Description |
---|---|---|
Command | c |
ExecuteCommand(Command, Action<Command, ParsedArguments>)
Declaration
protected void ExecuteCommand(Command command, Action<Command, ParsedArguments> handler)
Parameters
Type | Name | Description |
---|---|---|
Command | command | |
Action<Command, ParsedArguments> | handler |
ExecuteCommand(Command, Action<Command>)
Declaration
protected void ExecuteCommand(Command command, Action<Command> handler)
Parameters
Type | Name | Description |
---|---|---|
Command | command | |
Action<Command> | handler |
Process(String, Action<Command, ParsedArguments>)
Handles a Command with the provided name and handler. Executes command validation and fault-checking automatically.
Declaration
protected void Process(string commandName, Action<Command, ParsedArguments> handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | commandName | The name of the Command that will be processed. |
Action<Command, ParsedArguments> | handler | The handler for processing this command, provided that the Command is valid. |
Process(String, Action<Command>)
Handles a Command with the provided name and handler. Executes command validation and fault-checking automatically.
Declaration
protected void Process(string commandName, Action<Command> handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | commandName | The name of the Command that will be processed. |
Action<Command> | handler | The handler for processing this command, provided that the Command is valid. |