Class CommandCatalog
- Namespace
- Signal.Application.Commands
- Assembly
- Signal.Application.dll
Registration-time list of command sources, populated by the DI builder (AddCommands, AddCommand,
AddCommandModule, MapCommand) and consumed once by ICommandRegistry.
Registered in DI as a singleton instance.
public sealed class CommandCatalog
- Inheritance
-
CommandCatalog
- Inherited Members
Properties
CommandTypes
Registered ICommand implementations (must also be registered in DI).
public IReadOnlyList<Type> CommandTypes { get; }
Property Value
Descriptors
Directly registered descriptors (e.g. delegate commands).
public IReadOnlyList<CommandDescriptor> Descriptors { get; }
Property Value
ModuleTypes
Registered CommandModule types.
public IReadOnlyList<Type> ModuleTypes { get; }
Property Value
ReactionModuleTypes
Registered ReactionModule types.
public IReadOnlyList<Type> ReactionModuleTypes { get; }
Property Value
Methods
Add(CommandDescriptor)
Adds a ready-made descriptor.
public void Add(CommandDescriptor descriptor)
Parameters
descriptorCommandDescriptorThe descriptor.
AddCommand(Type)
Adds a class-based command type. Duplicates are ignored.
public void AddCommand(Type commandType)
Parameters
Exceptions
- ArgumentException
The type is not a non-abstract ICommand.
AddModule(Type)
Adds a command module type. Duplicates are ignored.
public void AddModule(Type moduleType)
Parameters
moduleTypeTypeA non-abstract CommandModule.
Exceptions
- ArgumentException
The type is not a non-abstract CommandModule.
AddReactionModule(Type)
Adds a reaction module type (its OnReactionAttribute methods). Duplicates are ignored.
public void AddReactionModule(Type moduleType)
Parameters
moduleTypeTypeA non-abstract ReactionModule.
Exceptions
- ArgumentException
The type is not a non-abstract ReactionModule.
- InvalidOperationException
A handler has an unsupported parameter or return type (checked now, not on the first reaction).