Show / Hide Table of Contents

Class SerializableValidationRuleResult

A model for a validation rule result which is easy to serialize/deserialize to/from data formats.

Inheritance
System.Object
SerializableValidationRuleResult
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

SerializableValidationRuleResult()

Initialises a new instance of SerializableValidationRuleResult.

Declaration
public SerializableValidationRuleResult()

Properties

| Improve this Doc View Source

ExceptionString

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

Outcome

Gets or sets the outcome of the validation rule.

Declaration
public RuleOutcome Outcome { get; set; }
Property Value
Type Description
RuleOutcome
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

ISerializable.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

Implements

System.Runtime.Serialization.ISerializable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX