Class IntHelper

Namespace
Elegy.ConsoleSystem.Commands.Helpers
Assembly
Elegy.ConsoleSystem.dll

Console argument helper for integer arguments.

public class IntHelper : HelperTemplate<int>, IConsoleArgumentHelper
Inheritance
IntHelper
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

object

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 if argument is valid, false otherwise.