Class SerializableValidationRuleResult
A model for a validation rule result which is easy to serialize/deserialize to/from data formats.
Inheritance
Implements
Inherited Members
Namespace: CSF.Validation
Assembly: CSF.Validation.Abstractions.dll
Syntax
[Serializable]
public sealed class SerializableValidationRuleResult : ISerializable
Remarks
Whilst this model lacks some of the functionality of a full validation result, it is easy to consume across API boundaries or mediums like JSON, XML or tables of a relational database.
This class conceptually corresponds to ValidationRuleResult.
Constructors
| Improve this Doc View SourceSerializableValidationRuleResult()
Initialises a new instance of SerializableValidationRuleResult.
Declaration
public SerializableValidationRuleResult()
Properties
| Improve this Doc View SourceExceptionString
Gets or sets a string representation of an exception which occured, leading to an error. Typically this will be null except when Outcome is set to Errored.
Declaration
public string ExceptionString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MemberName
Gets or sets the name of the member whose value is being validated by this rule.
Declaration
public string MemberName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Message
Gets or sets a human-readable feedback message to be associated with this rule result.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ObjectIdentityString
Gets or sets an optional string representation of the unique identity of the object being validated.
Declaration
public string ObjectIdentityString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Outcome
Gets or sets the outcome of the validation rule.
Declaration
public RuleOutcome Outcome { get; set; }
Property Value
Type | Description |
---|---|
RuleOutcome |
RuleName
Gets or sets an optional rule name, to uniquely identify this rule where other identifying information might be ambiguous.
Declaration
public string RuleName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RuleTypeName
Gets or sets name of the type of the validation rule logic class.
Declaration
public string RuleTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ValidatedTypeName
Gets or sets the name of the type of value that the rule validates.
Declaration
public string ValidatedTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Explicit Interface Implementations
| Improve this Doc View SourceISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |