Show / Hide Table of Contents

Class RuleResultIsForDescendentOfValue

A specification for validation rule results which must be for a specified value, or a descendent of that value.

Inheritance
System.Object
RuleResultIsForDescendentOfValue
Implements
CSF.Specifications.ISpecificationExpression<ValidationRuleResult>
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.dll
Syntax
public class RuleResultIsForDescendentOfValue : ISpecificationExpression<ValidationRuleResult>

Constructors

| Improve this Doc View Source

RuleResultIsForDescendentOfValue(ManifestItem, Boolean)

Initialises a new instance of RuleResultIsForDescendentOfValue without a validated item instance.

Declaration
public RuleResultIsForDescendentOfValue(ManifestItem value, bool allowAncestors = true)
Parameters
Type Name Description
ManifestItem value

A manifest value which rules must be a descendent of in order to match the spec.

System.Boolean allowAncestors

If true then rule results will match if the value appears in any ancestor context, as well as the rule's own context. If false then only the rule's immediate context will be searched, indicating that this is a specification for immediate children only.

Exceptions
Type Condition
System.ArgumentNullException

If value is null.

| Improve this Doc View Source

RuleResultIsForDescendentOfValue(ManifestItem, Object, Boolean)

Initialises a new instance of RuleResultIsForDescendentOfValue with a validated item instance..

Declaration
public RuleResultIsForDescendentOfValue(ManifestItem value, object item, bool allowAncestors = true)
Parameters
Type Name Description
ManifestItem value

A manifest value which rules must be a descendent of in order to match the spec.

System.Object item

An optional item (of the type indicated by the value) which the rule must be a descendent of.

System.Boolean allowAncestors

If true then rule results will match if the value appears in any ancestor context, as well as the rule's own context. If false then only the rule's immediate context will be searched, indicating that this is a specification for immediate children only.

Exceptions
Type Condition
System.ArgumentNullException

If value is null.

Methods

| Improve this Doc View Source

GetExpression()

Gets an expression which represents the current specification instance.

Declaration
public Expression<Func<ValidationRuleResult, bool>> GetExpression()
Returns
Type Description
System.Linq.Expressions.Expression<System.Func<ValidationRuleResult, System.Boolean>>

The specification expression.

Implements

CSF.Specifications.ISpecificationExpression<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX