Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class RegexCommandAttribute

    Marks a method as a Command for Commands System.

    Inheritance
    System.Object
    System.Attribute
    CommandAttributeBase
    RegexCommandAttribute
    Inherited Members
    CommandAttributeBase.Timeout
    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 Source

    RegexCommandAttribute(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
    DefaultOptions
    | Improve this Doc View Source

    RegexCommandAttribute(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 Source

    DefaultOptions

    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 Source

    Options

    Regex options for the command.

    Declaration
    public RegexOptions Options { get; }
    Property Value
    Type Description
    System.Text.RegularExpressions.RegexOptions
    | Improve this Doc View Source

    Pattern

    Regex pattern for the command.

    Declaration
    public string Pattern { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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

    See Also

    RegexCommandInitializer