C# Класс HandCoded.Validation.DelegatedRule

The DelegatedRule class provides a implementation of the abstract Rule class that allows the use of delegates.
Наследование: Rule
Показать файл Открыть проект

Открытые методы

Метод Описание
DelegatedRule ( Precondition precondition, string name, RuleDelegate function ) : System

Constructs a DelegatedRule with the given name and that applies in the circumstances defines by its Precondition.

DelegatedRule ( string name, RuleDelegate function ) : System

Constructs a DelegatedRule that applies to any document.

Защищенные методы

Метод Описание
Validate ( NodeIndex nodeIndex, ValidationErrorHandler errorHandler ) : bool

Determines if the XmlDocument instance indexed by the provided NodeIndex has business data content that passes a validation test. If errors are detected they will be reported through the ValidationErrorHandler instance passed as an argument.

Note that test returns true if it does not fail, including circumstances when the test is inapplicable to the XmlDocument under examination.

Описание методов

DelegatedRule() публичный Метод

Constructs a DelegatedRule with the given name and that applies in the circumstances defines by its Precondition.
public DelegatedRule ( Precondition precondition, string name, RuleDelegate function ) : System
precondition Precondition A Precondition instance.
name string The unique name for the rule.
function RuleDelegate The delegate function.
Результат System

DelegatedRule() публичный Метод

Constructs a DelegatedRule that applies to any document.
public DelegatedRule ( string name, RuleDelegate function ) : System
name string The unique name for the rule.
function RuleDelegate The delegate function.
Результат System

Validate() защищенный Метод

Determines if the XmlDocument instance indexed by the provided NodeIndex has business data content that passes a validation test. If errors are detected they will be reported through the ValidationErrorHandler instance passed as an argument.
Note that test returns true if it does not fail, including circumstances when the test is inapplicable to the XmlDocument under examination.
protected Validate ( NodeIndex nodeIndex, ValidationErrorHandler errorHandler ) : bool
nodeIndex HandCoded.Xml.NodeIndex The instance to examine.
errorHandler ValidationErrorHandler An instance used to report /// validation failures.
Результат bool