Class CommandsOptions
Options used for command processing.
Implements
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
public class CommandsOptions : ICommandOptions
Remarks
These are default options for CommandsService. They contain minimum amount of settings for core of Commands System to work.
If you need to create custom options, inherit from this class. All properties are settable, so they can be changed from child classes.
Properties
| Improve this Doc View SourceAssemblies
Collection of Assemblies to load Command Handlers from.
Declaration
public ICollection<Assembly> Assemblies { get; set; }
Property Value
Type | Description |
---|---|
ICollection<Assembly> |
Remarks
Types need to have CommandsHandlerAttribute to be treated as a loadable type. Any type without that attribute will be ignored.
CancellationToken
Cancellation token that can be used for cancelling all tasks within CommandsService.
Declaration
public CancellationToken CancellationToken { get; set; }
Property Value
Type | Description |
---|---|
CancellationToken |
CaseSensitivity
Whether commands should behave case-sensitive by default. Default value is false.
Declaration
public bool CaseSensitivity { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
This setting can be overwritten per command using CaseSensitivityAttribute.
See Also
| Improve this Doc View SourceClasses
Collection of Types to load as Command Handlers.
Declaration
public ICollection<Type> Classes { get; set; }
Property Value
Type | Description |
---|---|
ICollection<Type> |
Remarks
Any type included in this collection does not need to have CommandsHandlerAttribute.
See Also
| Improve this Doc View SourceEnableDefaultHelpCommand
Whether the built-in default help command should be enabled.
Declaration
public bool EnableDefaultHelpCommand { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
This command will be added independently on Classes and Assemblies.
Defaults to false.
Prefix
Prefix commands need to have. Default value is "!".
Declaration
public string Prefix { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The actual requirement for command to have a prefix is specified by RequirePrefix.
See Also
| Improve this Doc View SourceRequirePrefix
How prefix requirement is enforced by default. Default value is "Always".
Declaration
public PrefixRequirement RequirePrefix { get; set; }
Property Value
Type | Description |
---|---|
PrefixRequirement |
Remarks
Prefix value can be set using Prefix