Show / Hide Table of Contents

Class ValidationError

Reports that there was a validation issue with a Command.

Inheritance
object
ValidationError
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Petabridge.Cmd.Validation
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
Type Name Description
string module
string command
string argument
string value
string errorMessage
string helpInfo

Fields

NullCmd

Singleton used for when a null command is given.

Declaration
public static readonly ValidationError NullCmd
Field Value
Type Description
ValidationError

Properties

Argument

Optional. The name of the argument that failed.

Declaration
public string Argument { get; }
Property Value
Type Description
string

Command

The name of the command that failed.

Declaration
public string Command { get; }
Property Value
Type Description
string

ErrorMessage

The validation error message.

Declaration
public string ErrorMessage { get; }
Property Value
Type Description
string

HelpInfo

Optional. A help message with information on how to resolve the issue.

Declaration
public string HelpInfo { get; }
Property Value
Type Description
string

Module

The module of the command / argument that failed

Declaration
public string Module { get; }
Property Value
Type Description
string

Value

Optional. The value of the argument that failed.

Declaration
public string Value { get; }
Property Value
Type Description
string

Methods

IllegalDuplicateArgument(string, string, string)

Declaration
public static ValidationError IllegalDuplicateArgument(string moduleName, string commandName, string argumentName)
Parameters
Type Name Description
string moduleName
string commandName
string argumentName
Returns
Type Description
ValidationError

MissingArgumentValue(string, string, string)

Declaration
public static ValidationError MissingArgumentValue(string moduleName, string commandName, string argumentName)
Parameters
Type Name Description
string moduleName
string commandName
string argumentName
Returns
Type Description
ValidationError

MissingRequiredArgument(string, string, string)

Declaration
public static ValidationError MissingRequiredArgument(string moduleName, string commandName, string argumentName)
Parameters
Type Name Description
string moduleName
string commandName
string argumentName
Returns
Type Description
ValidationError

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

UnexpectedFlagValue(string, string, string, string)

Declaration
public static ValidationError UnexpectedFlagValue(string moduleName, string commandName, string argumentName, string value)
Parameters
Type Name Description
string moduleName
string commandName
string argumentName
string value
Returns
Type Description
ValidationError

UnknownArgument(string, string, string)

Declaration
public static ValidationError UnknownArgument(string moduleName, string commandName, string argumentName)
Parameters
Type Name Description
string moduleName
string commandName
string argumentName
Returns
Type Description
ValidationError

UnknownCommand(string, string)

Declaration
public static ValidationError UnknownCommand(string moduleName, string commandName)
Parameters
Type Name Description
string moduleName
string commandName
Returns
Type Description
ValidationError

UnknownModule(string, string)

Declaration
public static ValidationError UnknownModule(string expectedModuleName, string actualModuleName)
Parameters
Type Name Description
string expectedModuleName
string actualModuleName
Returns
Type Description
ValidationError
In this article
Back to top Generated by DocFX