C# Класс HandCoded.FpML.Validation.ReferenceRule

The ReferenceRule class validates an intra-document reference recorded using 'ID' and 'IDREF' based attributes. When possible type information is used to locate possible matching elements otherwise element names are used instead.
Наследование: HandCoded.Validation.Rule
Показать файл Открыть проект

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

Метод Описание
ReferenceRule ( Precondition precondition, string name, string contextType, string contextElements, string targetType, string targetElements ) : System

Construct a ReferenceRule instance that will locate context and target elements based on the data provided.

ReferenceRule ( Precondition precondition, string name, string contextType, string contextElements, string targetType, string targetElements, string referenceAttribute ) : System

Construct a ReferenceRule instance that will locate context and target elements based on the data provided.

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

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

Validates all the elements registered at construction using the NodeIndex to locate them as quickly as possible.

Validate ( XmlNodeList contexts, XmlNodeList targets, ValidationErrorHandler errorHandler ) : bool

Checks the elements in context XmlNodeList to see if they reference elements in the target XmlNodeList.

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

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

Construct a ReferenceRule instance that will locate context and target elements based on the data provided.
public ReferenceRule ( Precondition precondition, string name, string contextType, string contextElements, string targetType, string targetElements ) : System
precondition HandCoded.Validation.Precondition A instance.
name string The unique name for the rule.
contextType string The schema type for the context element.
contextElements string An array of potential context element names.
targetType string The schema type for the target element.
targetElements string An array of potential target element names.
Результат System

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

Construct a ReferenceRule instance that will locate context and target elements based on the data provided.
public ReferenceRule ( Precondition precondition, string name, string contextType, string contextElements, string targetType, string targetElements, string referenceAttribute ) : System
precondition HandCoded.Validation.Precondition A instance.
name string The unique name for the rule.
contextType string The schema type for the context element.
contextElements string An array of potential context element names.
targetType string The schema type for the target element.
targetElements string An array of potential target element names.
referenceAttribute string The name of the attribute containing the reference.
Результат System

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

Validates all the elements registered at construction using the NodeIndex to locate them as quickly as possible.
protected Validate ( NodeIndex nodeIndex, ValidationErrorHandler errorHandler ) : bool
nodeIndex HandCoded.Xml.NodeIndex The of the test document.
errorHandler ValidationErrorHandler The used to report issues.
Результат bool

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

Checks the elements in context XmlNodeList to see if they reference elements in the target XmlNodeList.
protected Validate ( XmlNodeList contexts, XmlNodeList targets, ValidationErrorHandler errorHandler ) : bool
contexts System.Xml.XmlNodeList A of context instances.
targets System.Xml.XmlNodeList A of target instances.
errorHandler ValidationErrorHandler The used to report errors.
Результат bool