Class FloatHelper
- Namespace
- Elegy.ConsoleSystem.Commands.Helpers
- Assembly
- Elegy.ConsoleSystem.dll
Console argument helper for floating-point arguments.
public class FloatHelper : HelperTemplate<float>, IConsoleArgumentHelper
- Inheritance
-
FloatHelper
- Implements
- Inherited Members
Methods
Parse(ReadOnlySpan<char>)
Parses the argument as a string and resolves it as the appropriate datatype Type.
public override 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
.
public override bool Validate(ReadOnlySpan<char> argument, out string? errorMessage)
Parameters
argument
ReadOnlySpan<char>errorMessage
string
Returns
- bool
true
ifargument
is valid,false
otherwise.