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

    Class CommandArgumentExtensions

    Extensions for command argument reflection.

    Inheritance
    System.Object
    CommandArgumentExtensions
    Namespace: TehGM.Wolfringo.Commands.Parsing
    Assembly: Wolfringo.Commands.dll
    Syntax
    public static class CommandArgumentExtensions

    Methods

    | Improve this Doc View Source

    GetArgumentName(ParameterInfo)

    Gets name of the argument.

    Declaration
    public static string GetArgumentName(this ParameterInfo parameter)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter
    Returns
    Type Description
    System.String

    Argument name.

    Remarks

    If ArgumentNameAttribute is specified for the parameter, its value will be used. If it's missing, it will default to parameter name.

    | Improve this Doc View Source

    GetConvertingErrorAttribute(ParameterInfo)

    Loads [ConvertingError] attribute specified for a param, or default if not present.

    Declaration
    public static ConvertingErrorAttribute GetConvertingErrorAttribute(this ParameterInfo parameter)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter
    Returns
    Type Description
    ConvertingErrorAttribute

    Instance of attribute.

    | Improve this Doc View Source

    GetMissingErrorAttribute(ParameterInfo)

    Loads [MissingError] attribute specified for a param, or default if not present.

    Declaration
    public static MissingErrorAttribute GetMissingErrorAttribute(this ParameterInfo parameter)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter
    Returns
    Type Description
    MissingErrorAttribute

    Instance of attribute.

    | Improve this Doc View Source

    GetTypeName(ParameterInfo)

    Gets name of the argument's type.

    Declaration
    public static string GetTypeName(this ParameterInfo parameter)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter
    Returns
    Type Description
    System.String

    Argument's type name.

    Remarks

    If ArgumentTypeNameAttribute is specified for the parameter, its value will be used. If it's missing, it will default to parameter Type's name.