Class ValidationError
Reports that there was a validation issue with a Command.
Inheritance
ValidationError
Assembly: Petabridge.Cmd.Common.dll
Syntax
public sealed class ValidationError
Constructors
ValidationError(string, string, string, string, string, string)
Declaration
public ValidationError(string module, string command, string argument, string value, string errorMessage, string helpInfo = null)
Parameters
Fields
NullCmd
Singleton used for when a null command is given.
Declaration
public static readonly ValidationError NullCmd
Field Value
Properties
Argument
Optional. The name of the argument that failed.
Declaration
public string Argument { get; }
Property Value
Command
The name of the command that failed.
Declaration
public string Command { get; }
Property Value
ErrorMessage
The validation error message.
Declaration
public string ErrorMessage { get; }
Property Value
HelpInfo
Optional. A help message with information on how to resolve the issue.
Declaration
public string HelpInfo { get; }
Property Value
Module
The module of the command / argument that failed
Declaration
public string Module { get; }
Property Value
Value
Optional. The value of the argument that failed.
Declaration
public string Value { get; }
Property Value
Methods
IllegalDuplicateArgument(string, string, string)
Declaration
public static ValidationError IllegalDuplicateArgument(string moduleName, string commandName, string argumentName)
Parameters
Returns
MissingArgumentValue(string, string, string)
Declaration
public static ValidationError MissingArgumentValue(string moduleName, string commandName, string argumentName)
Parameters
Returns
MissingRequiredArgument(string, string, string)
Declaration
public static ValidationError MissingRequiredArgument(string moduleName, string commandName, string argumentName)
Parameters
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
UnexpectedFlagValue(string, string, string, string)
Declaration
public static ValidationError UnexpectedFlagValue(string moduleName, string commandName, string argumentName, string value)
Parameters
Returns
UnknownArgument(string, string, string)
Declaration
public static ValidationError UnknownArgument(string moduleName, string commandName, string argumentName)
Parameters
Returns
UnknownCommand(string, string)
Declaration
public static ValidationError UnknownCommand(string moduleName, string commandName)
Parameters
Returns
UnknownModule(string, string)
Declaration
public static ValidationError UnknownModule(string expectedModuleName, string actualModuleName)
Parameters
| Type |
Name |
Description |
| string |
expectedModuleName |
|
| string |
actualModuleName |
|
Returns