Class RegexCommandAttribute
Marks a method as a Command for Commands System.
Inherited Members
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
public class RegexCommandAttribute : CommandAttributeBase
Remarks
This attribute represents a regex command. It's designed to be initialized by RegexCommandInitializer.
Constructors
| Improve this Doc View SourceRegexCommandAttribute(String)
Creates the attribute, using default regex options.
Declaration
public RegexCommandAttribute(string pattern)
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | Regex pattern for the command. |
See Also
| Improve this Doc View SourceRegexCommandAttribute(String, RegexOptions)
Creates the attribute with specified regex settings.
Declaration
public RegexCommandAttribute(string pattern, RegexOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | Regex pattern for the command. |
System.Text.RegularExpressions.RegexOptions | options | Regex options for the command. |
Fields
| Improve this Doc View SourceDefaultOptions
Default regex options for the regex command.
Declaration
public const RegexOptions DefaultOptions = RegexOptions.Singleline | RegexOptions.CultureInvariant
Field Value
Type | Description |
---|---|
System.Text.RegularExpressions.RegexOptions |
Properties
| Improve this Doc View SourceOptions
Regex options for the command.
Declaration
public RegexOptions Options { get; }
Property Value
Type | Description |
---|---|
System.Text.RegularExpressions.RegexOptions |
Pattern
Regex pattern for the command.
Declaration
public string Pattern { get; }
Property Value
Type | Description |
---|---|
System.String |
RegexDefaultTimeout
Indicates default timeout (in milliseconds) to use when parsing user's input. Equals 1000 milliseconds.
Declaration
public static int RegexDefaultTimeout { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RegexTimeout
Specifies timeout (in milliseconds) for Regex engine. RegexDefaultTimeout is used by default.
Declaration
public int RegexTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |