Struct ParseResult
Contains information for the parsing result from the command service's parser.
public struct ParseResult : IResult
- Implements
- Inherited Members
Properties
ArgValues
public readonly IReadOnlyList<TypeReaderResult> ArgValues { get; }
Property Value
Error
Describes the error type that may have occurred during the operation.
public readonly CommandError? Error { get; }
Property Value
- CommandError?
A CommandError indicating the type of error that may have occurred during the operation; null if the operation was successful.
ErrorParameter
Provides information about the parameter that caused the parsing error.
public readonly ParameterInfo ErrorParameter { get; }
Property Value
- ParameterInfo
A ParameterInfo indicating the parameter info of the error that may have occurred during parsing; null if the parsing was successful or the parsing error is not specific to a single parameter.
ErrorReason
Describes the reason for the error.
public readonly string ErrorReason { get; }
Property Value
- string
A string containing the error reason.
IsSuccess
Indicates whether the operation was successful or not.
public bool IsSuccess { get; }
Property Value
ParamValues
public readonly IReadOnlyList<TypeReaderResult> ParamValues { get; }
Property Value
Methods
FromError(CommandError, string)
public static ParseResult FromError(CommandError error, string reason)
Parameters
error
CommandErrorreason
string
Returns
FromError(CommandError, string, ParameterInfo)
public static ParseResult FromError(CommandError error, string reason, ParameterInfo parameterInfo)
Parameters
error
CommandErrorreason
stringparameterInfo
ParameterInfo
Returns
FromError(IResult)
public static ParseResult FromError(IResult result)
Parameters
result
IResult
Returns
FromError(IResult, ParameterInfo)
public static ParseResult FromError(IResult result, ParameterInfo parameterInfo)
Parameters
result
IResultparameterInfo
ParameterInfo
Returns
FromError(Exception)
public static ParseResult FromError(Exception ex)
Parameters
ex
Exception
Returns
FromSuccess(IReadOnlyList<TypeReaderResult>, IReadOnlyList<TypeReaderResult>)
public static ParseResult FromSuccess(IReadOnlyList<TypeReaderResult> argValues, IReadOnlyList<TypeReaderResult> paramValues)
Parameters
argValues
IReadOnlyList<TypeReaderResult>paramValues
IReadOnlyList<TypeReaderResult>
Returns
FromSuccess(IReadOnlyList<TypeReaderValue>, IReadOnlyList<TypeReaderValue>)
public static ParseResult FromSuccess(IReadOnlyList<TypeReaderValue> argValues, IReadOnlyList<TypeReaderValue> paramValues)
Parameters
argValues
IReadOnlyList<TypeReaderValue>paramValues
IReadOnlyList<TypeReaderValue>
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.