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

    Interface IArgumentConverter

    A converter for a command method argument that converts string value to a specific parameter type.

    Namespace: TehGM.Wolfringo.Commands.Parsing
    Assembly: Wolfringo.Commands.dll
    Syntax
    public interface IArgumentConverter

    Methods

    | Improve this Doc View Source

    CanConvert(ParameterInfo)

    Determines whether this converter can convert an argument to given parameter.

    Declaration
    bool CanConvert(ParameterInfo parameter)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter

    Parameter to convert the argument to.

    Returns
    Type Description
    System.Boolean

    True if this converter can be used for the conversion; otherwise false.

    | Improve this Doc View Source

    Convert(ParameterInfo, String)

    Converts an argument to given parameter.

    Declaration
    object Convert(ParameterInfo parameter, string arg)
    Parameters
    Type Name Description
    System.Reflection.ParameterInfo parameter

    Parameter to convert the argument to.

    System.String arg

    Argument to convert.

    Returns
    Type Description
    System.Object

    Argument converted to given type.