Show / Hide Table of Contents

Class ManifestRule

A model for a single validation rule within a ValidationManifest.

Inheritance
System.Object
ManifestRule
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)
Namespace: CSF.Validation.Manifest
Assembly: CSF.Validation.Abstractions.dll
Syntax
public class ManifestRule
Remarks

The validation manifest is the model by which validators are described, including how they should validate objects and values.

The validation manifest objects are not particularly suited to serialization, as they support the use of types that cannot be easily serialized. If you are looking for a way to create/define a validator using serialized data then please read the article Using the Manifest Model.

Constructors

| Improve this Doc View Source

ManifestRule(ManifestItem, ManifestRuleIdentifier)

Initialises a new instance of ManifestRule.

Declaration
public ManifestRule(ManifestItem manifestValue, ManifestRuleIdentifier identifier)
Parameters
Type Name Description
ManifestItem manifestValue

The manifest value for which this rule applies.

ManifestRuleIdentifier identifier

The identifier for this rule.

Properties

| Improve this Doc View Source

DependencyRules

Gets or sets a collection of identifiers upon which the current rule depends.

Declaration
public ICollection<ManifestRuleIdentifier> DependencyRules { get; set; }
Property Value
Type Description
System.Collections.Generic.ICollection<ManifestRuleIdentifier>
Remarks

A dependency rule is a rule which must have executed and passed before the current rule may be executed. If the dependency rule does not complete with a Passed outcome, then the current rule will not be executed and will automatically be recorded with a DependencyFailed outcome.

| Improve this Doc View Source

Identifier

Gets the rule's unique identifier.

Declaration
public ManifestRuleIdentifier Identifier { get; }
Property Value
Type Description
ManifestRuleIdentifier
Remarks

This value includes the rule's concrete type.

| Improve this Doc View Source

ManifestValue

Gets the manifest value to which this rule applies.

Declaration
public ManifestItem ManifestValue { get; }
Property Value
Type Description
ManifestItem
| Improve this Doc View Source

RuleConfiguration

Gets or sets an optional action which is used to configure the rule instance after it has been instantiated.

Declaration
public Action<object> RuleConfiguration { get; set; }
Property Value
Type Description
System.Action<System.Object>

Methods

| Improve this Doc View Source

ToString()

Gets a string representation of the current instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string representation of the current instance.

Overrides
System.Object.ToString()

See Also

ManifestRuleIdentifier
ValidationManifest
ManifestItem
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX