Show / Hide Table of Contents

Class CommandHandlerActor

Convenience class for creating actors who handle Commands sent from a Petabridge.Cmd client.

Inheritance
object
ActorBase
UntypedActor
ReceiveActor
CommandHandlerActor
Implements
IInternalActor
IInitializableActor
Inherited Members
ReceiveActor.OnReceive(object)
ReceiveActor.Become(Action)
ReceiveActor.BecomeStacked(Action)
ReceiveActor.ReceiveAsync<T>(Func<T, Task>, Predicate<T>)
ReceiveActor.ReceiveAsync<T>(Predicate<T>, Func<T, Task>)
ReceiveActor.ReceiveAsync(Type, Func<object, Task>, Predicate<object>)
ReceiveActor.ReceiveAsync(Type, Predicate<object>, Func<object, Task>)
ReceiveActor.ReceiveAnyAsync(Func<object, Task>)
ReceiveActor.Receive<T>(Action<T>, Predicate<T>)
ReceiveActor.Receive<T>(Predicate<T>, Action<T>)
ReceiveActor.Receive(Type, Action<object>, Predicate<object>)
ReceiveActor.Receive(Type, Predicate<object>, Action<object>)
ReceiveActor.Receive<T>(Func<T, bool>)
ReceiveActor.Receive(Type, Func<object, bool>)
ReceiveActor.ReceiveAny(Action<object>)
UntypedActor.Receive(object)
UntypedActor.RunTask(Action)
UntypedActor.RunTask(Func<Task>)
UntypedActor.Become(UntypedReceive)
UntypedActor.BecomeStacked(UntypedReceive)
UntypedActor.Context
ActorBase.AroundReceive(Receive, object)
ActorBase.Unhandled(object)
ActorBase.Become(Receive)
ActorBase.BecomeStacked(Receive)
ActorBase.UnbecomeStacked()
ActorBase.SetReceiveTimeout(TimeSpan?)
ActorBase.AroundPreRestart(Exception, object)
ActorBase.AroundPreStart()
ActorBase.PreStart()
ActorBase.AroundPostRestart(Exception, object)
ActorBase.PreRestart(Exception, object)
ActorBase.PostRestart(Exception)
ActorBase.AroundPostStop()
ActorBase.PostStop()
ActorBase.SupervisorStrategy()
ActorBase.Sender
ActorBase.Self
ActorBase.EmptyReceive
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Petabridge.Cmd.Host
Assembly: Petabridge.Cmd.Host.dll
Syntax
public abstract class CommandHandlerActor : ReceiveActor, IInternalActor, IInitializableActor

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

Validates Command input against the rules defined in Commands.

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

Implements

IInternalActor
IInitializableActor
In this article
Back to top Generated by DocFX