C# Class System.Xml.Xsl.Qil.QilValidationVisitor

A internal class that validates QilExpression graphs.
QilValidationVisitor traverses the QilExpression graph once to enforce the following constraints: No circular references No duplicate nodes (except for references) No out-of-scope references Type constraints on operands Type constraints on operators No null objects (except where allowed) No Unknown node types

When an error occurs, it marks the offending node with an annotation and continues checking, allowing the detection of multiple errors at once and printing the structure after validation. (In the case of circular references, it breaks the loop at the circular reference to allow the graph to print correctly.)

Inheritance: QilScopedVisitor
Exibir arquivo Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Protected Properties

Property Type Description
allNodes System.Collections.Hashtable
parents System.Collections.Hashtable
scope System.Collections.Hashtable

Protected Methods

Method Description
BeginScope ( QilNode node ) : void

Add an iterator or function to scope if it hasn't been added already.

EndScope ( QilNode node ) : void

Pop scope.

QilValidationVisitor ( ) : System.Collections
VisitChildren ( QilNode parent ) : QilNode
VisitReference ( QilNode node ) : QilNode

Ensure that the function or iterator reference is already in scope.

Private Methods

Method Description
AddNode ( QilNode n ) : bool
SetError ( QilNode n, string message ) : void
Validate ( QilNode node ) : void

Method Details

BeginScope() protected method

Add an iterator or function to scope if it hasn't been added already.
protected BeginScope ( QilNode node ) : void
node QilNode
return void

EndScope() protected method

Pop scope.
protected EndScope ( QilNode node ) : void
node QilNode
return void

QilValidationVisitor() protected method

protected QilValidationVisitor ( ) : System.Collections
return System.Collections

VisitChildren() protected method

protected VisitChildren ( QilNode parent ) : QilNode
parent QilNode
return QilNode

VisitReference() protected method

Ensure that the function or iterator reference is already in scope.
protected VisitReference ( QilNode node ) : QilNode
node QilNode
return QilNode

Property Details

allNodes protected_oe property

protected Hashtable,System.Collections allNodes
return System.Collections.Hashtable

parents protected_oe property

protected Hashtable,System.Collections parents
return System.Collections.Hashtable

scope protected_oe property

protected Hashtable,System.Collections scope
return System.Collections.Hashtable