Default implementation of the IValidateMessage interface.
class
|
ValidateMessage
|
implements
|
IValidateMessage
|
||
base of
|
ParsingError
|
The context object.
public
property
|
MessageContext
{
get
set
}
|
||
type
|
object
|
||
value
|
The
context
object
or
null . |
||
implements
|
IValidateMessage.MessageContext
|
The model path that leads to the error source.
public
property
|
MessagePath
{
get
set
}
|
||
type
|
ValidatePath
|
||
value
|
The error path (will be None) if no path is available. | ||
implements
|
IValidateMessage.MessagePath
|
Message that describes this error.
public
property
|
MessageText
{
get
}
|
||
type
|
string
|
||
value
|
|
The error message. | |
implements
|
IValidateMessage.MessageText
|
The message type.
public
property
|
MessageType
{
get
}
|
||
type
|
ValidateMessageType
|
||
value
|
The message type. | ||
implements
|
IValidateMessage.MessageType
|
Compares this object with the given one.
[Pure]
|
||||
public
virtual
method
|
CompareTo
(IValidateMessage other)
|
|||
type
|
int32
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
<
0
:
if
this
object
is
less
than
other, = 0 : if this object is equal to other, > 0 : if this object is greater than other. |
|||
implements
|
IComparable.CompareTo
|
Creates a new custom validation message.
[Pure]
|
||||
public
static
method
|
Custom
(string message,
ValidateMessageType type = ValidateMessageType.Error)
|
|||
type
|
ValidateMessage
|
|||
params
|
message
|
The message text. | ||
type
|
The message type. Defaults to Error. | |||
returns
|
|
The message object. |
The path does not point to an existing file.
[Pure]
|
||||
public
static
method
|
DirectoryNotFound
(Path path,
bool error = false)
|
|||
type
|
ValidateMessage
|
|||
params
|
path
|
The path. | ||
error
|
Generate
error
message
instead
of
warning?
Defaults
to
false .
|
|||
returns
|
|
The message object. |
Compares this object with the given one.
[Pure]
|
||||
public
virtual
method
|
Equals
(IValidateMessage other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
implements
|
IEquatable.Equals
|
The path does not point to an existing file.
[Pure]
|
||||
public
static
method
|
FileNotFound
(Path path,
bool error = false)
|
|||
type
|
ValidateMessage
|
|||
params
|
path
|
The path. | ||
error
|
Generate
error
message
instead
of
warning?
Defaults
to
false .
|
|||
returns
|
|
The message object. |
The element being validated has an invalid value.
[Pure]
|
||||
public
static
method
|
InvalidValue
()
|
|||
type
|
ValidateMessage
|
|||
returns
|
|
The message object. |
The element being validated does not have a value.
[Pure]
|
||||
public
static
method
|
MissingValue
()
|
|||
type
|
ValidateMessage
|
|||
returns
|
|
The message object. |
The path does not point to an existing file or directory.
[Pure]
|
||||
public
static
method
|
PathNotFound
(Path path,
bool error = false)
|
|||
type
|
ValidateMessage
|
|||
params
|
path
|
The path. | ||
error
|
Generate
error
message
instead
of
warning?
Defaults
to
false .
|
|||
returns
|
|
The message object. |
public
method
|
Throw
(string source)
|
||
type
|
ValidatingException
|
||
params
|
source
|
||
implements
|
IValidateMessage.Throw
|
[Pure]
|
||||
public
override
sealed
method
|
ToString
()
|
|||
type
|
string
|
public
virtual
method
|
ToString
(IValidateMessage previous)
|
||
type
|
string
|
||
params
|
previous
|
||
implements
|
IValidateMessage.ToString
|
Creates a new instance of ValidateMessage.
protected
constructor
|
ValidateMessage
(string messageText,
ValidateMessageType messageType = ValidateMessageType.Error)
|
||
params
|
messageText
|
[not-null]
|
The validation message text. |
messageType
|
The validation message type. Defaults to Error. |