Class ManifestRuleIdentifier
A model for information which uniquely identifies a validation rule within a validation manifest.
Implements
Inherited Members
Namespace: CSF.Validation.Manifest
Assembly: CSF.Validation.Abstractions.dll
Syntax
public sealed class ManifestRuleIdentifier : RuleIdentifierBase, IEquatable<ManifestRuleIdentifier>
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 SourceManifestRuleIdentifier(ManifestItem, Type, String)
Initializes a new instance of RuleIdentifier.
Declaration
public ManifestRuleIdentifier(ManifestItem manifestValue, Type ruleType, string ruleName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ManifestItem | manifestValue | The manifest value/object which 'contains' this rule. |
| System.Type | ruleType | The rule type. |
| System.String | ruleName | An optional rule name. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | If either |
Properties
| Improve this Doc View SourceManifestValue
Gets the manifest object to which this rule relates.
Declaration
public ManifestItem ManifestValue { get; }
Property Value
| Type | Description |
|---|---|
| ManifestItem |
Methods
| Improve this Doc View SourceEquals(ManifestRuleIdentifier)
Gets a value that indicates whether the specified ManifestRuleIdentifier is equal to the current instance or not.
Declaration
public bool Equals(ManifestRuleIdentifier other)
Parameters
| Type | Name | Description |
|---|---|---|
| ManifestRuleIdentifier | other | A manifest rule identifier. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the specified instance is equal to the current one; false otherwise. |
Equals(Object)
Gets a value that indicates whether the specified object is equal to the current instance or not.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | An object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the specified object is equal to the current instance; false otherwise. |
Overrides
GetHashCode()
Gets a hash value for the current instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | The hash value. |
Overrides
ToString()
Gets a human-readable string representation of the current instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string that describes the current rule identifier. |