AbstractValidator Class
An abstraction of the validator.
public abstract class AbstractValidator
- Inheritance
-
Abstract
Validator
- Derived
Constructors
Abstract |
Initializes a new instance of the AbstractValidator class. |
Properties
Is |
Gets a value indicating whether this validator has detected errors. |
Methods
Get |
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.
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.
public bool IsValid { get; }
Property Value
Methods Detail
GetMessages()
Get a new log messages representing the warnings/errors that this validator has detected.
public IEnumerable<string> GetMessages()
Returns
The log messages.
Warn(string, object[])
Logs a warning message.
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.
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.