Interface IConsoleArgumentHelper
- Namespace
- Elegy.ConsoleSystem.Commands.Helpers
- Assembly
- Elegy.ConsoleSystem.dll
Interface for ConsoleCommand argument parsing utilities.
public interface IConsoleArgumentHelper
Properties
Type
The datatype that the helper works with.
Type Type { get; }
Property Value
Methods
Parse(ReadOnlySpan<char>)
Parses the argument as a string and resolves it as the appropriate datatype Type.
object Parse(ReadOnlySpan<char> argument)
Parameters
argument
ReadOnlySpan<char>
Returns
Validate(ReadOnlySpan<char>, out string?)
Checks if argument
can be validated and if not, fills in errorMessage
.
bool Validate(ReadOnlySpan<char> argument, out string? errorMessage)
Parameters
argument
ReadOnlySpan<char>errorMessage
string
Returns
- bool
true
ifargument
is valid,false
otherwise.