Show / Hide Table of Contents

Class RuleIdentifierBase

Base model for rule identifiers.

Inheritance
System.Object
RuleIdentifierBase
ManifestRuleIdentifier
RuleIdentifier
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.Rules
Assembly: CSF.Validation.Abstractions.dll
Syntax
public abstract class RuleIdentifierBase

Constructors

| Improve this Doc View Source

RuleIdentifierBase(Type, Type, String)

Initializes a new instance of RuleIdentifierBase.

Declaration
protected RuleIdentifierBase(Type ruleType, Type validatedType, string ruleName = null)
Parameters
Type Name Description
System.Type ruleType

The rule type.

System.Type validatedType

The type of value that the rule validates.

System.String ruleName

An optional rule name.

Properties

| Improve this Doc View Source

RuleName

An optional rule name, to uniquely identify this rule where other identifying information might be ambiguous.

Declaration
public string RuleName { get; }
Property Value
Type Description
System.String
Remarks

Any rule may have a name, whether it needs one or not. Rules only require a name when the other identifying information would not uniquely identify the rule. That being:

  • The rule type: RuleType
  • The object identifier (where applicable)
  • The member name which provides the value being validated (where applicable)

In these cases where the three pieces of information above are insufficient to uniquely identify a rule, then the rule must be named in order for its identity to be unambiguous. This is most common when the same rule type is applied more than once to the same validated value (but each time with different configuration).

| Improve this Doc View Source

RuleType

The type of the validation rule logic class.

Declaration
public Type RuleType { get; }
Property Value
Type Description
System.Type
| Improve this Doc View Source

ValidatedType

Gets the System.Type of value that the rule validates.

Declaration
public Type ValidatedType { get; }
Property Value
Type Description
System.Type
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX