Class CommandContextOptions
Computed options for a single execution of command.
Implements
Namespace: TehGM.Wolfringo.Commands.Parsing
Assembly: Wolfringo.Commands.dll
Syntax
public class CommandContextOptions : ICommandOptions
Constructors
| Improve this Doc View SourceCommandContextOptions(String, PrefixRequirement, Boolean)
Creates a new options instance for command execution context.
Declaration
public CommandContextOptions(string prefix, PrefixRequirement requirePrefix, bool caseSensitivity)
Parameters
Type | Name | Description |
---|---|---|
String | prefix | Prefix of the executing command. |
PrefixRequirement | requirePrefix | Prefix requirement of the executing command. |
Boolean | caseSensitivity | Case sensitivity of the executing command. |
Properties
| Improve this Doc View SourceCaseSensitivity
Case sensitivity of the executing command.
Declaration
public bool CaseSensitivity { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
This setting can be overwritten per command using CaseSensitivityAttribute.
See Also
| Improve this Doc View SourcePrefix
Prefix of the executing command.
Declaration
public string Prefix { get; }
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
Prefix requirement of the executing command.
Declaration
public PrefixRequirement RequirePrefix { get; }
Property Value
Type | Description |
---|---|
PrefixRequirement |
Remarks
Prefix value can be set using Prefix
See Also
Methods
| Improve this Doc View SourceBuild(ICommandOptions, ICommandInstanceDescriptor)
Builds options for command exection context from base options and descriptor with overrides.
Declaration
public static CommandContextOptions Build(ICommandOptions originalOptions, ICommandInstanceDescriptor descriptor)
Parameters
Type | Name | Description |
---|---|---|
ICommandOptions | originalOptions | Base options. |
ICommandInstanceDescriptor | descriptor | Command descriptor that overrides options. |
Returns
Type | Description |
---|---|
CommandContextOptions | A new options instance for command execution context. |