C# Class 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.
Inheritance: HandCoded.Validation.Rule
Afficher le fichier Open project: formicary/fpml-toolkit-csharp

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

ReferenceRule() public méthode

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.
Résultat System

ReferenceRule() public méthode

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.
Résultat System

Validate() protected méthode

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.
Résultat bool

Validate() protected méthode

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.
Résultat bool