AbstractValidator Class

An abstraction of the validator.

C#
public abstract class AbstractValidator
Inheritance
AbstractValidator
Derived

Constructors

AbstractValidator(string)

Initializes a new instance of the AbstractValidator class.

Properties

IsValid

Gets a value indicating whether this validator has detected errors.

Methods

GetMessages()

Get a new log messages representing the warnings/errors that this validator has detected.

Warn(string, object[])

Logs a warning message.

Error(string, object[])

Logs an error message and marks this validator to indicate that it has detected errors.

Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

AbstractValidator(string)

Initializes a new instance of the AbstractValidator class.

C#
protected AbstractValidator(string label)

Parameters

label
string

The prefix for each log message.

Properties Detail

IsValid

Gets a value indicating whether this validator has detected errors.

C#
public bool IsValid { get; }

Property Value

Methods Detail

GetMessages()

Get a new log messages representing the warnings/errors that this validator has detected.

C#
public IEnumerable<string> GetMessages()

Returns

The log messages.

Warn(string, object[])

Logs a warning message.

C#
protected void Warn(string message, params object[] args)

Parameters

message
string

The key of the resource bundle representing the pattern of the formatted string.

args
object[]

The arguments for the formatted string.

Error(string, object[])

Logs an error message and marks this validator to indicate that it has detected errors.

C#
protected void Error(string message, params object[] args)

Parameters

message
string

The key of the resource bundle representing the pattern of the formatted string.

args
object[]

The arguments for the formatted string.