Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
XmlScriptWildcard.cs
2using System.Xml;
6
8{
13 {
14 private XmlScriptNode next = null;
15
23 : base(Start, Length, Expression)
24 {
25 }
26
34 public override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
35 {
36 return true;
37 }
38
45 internal override void Build(XmlDocument Document, XmlElement Parent, Variables Variables)
46 {
47 throw new ScriptRuntimeException("Wildcards cannot be used to build XML documents.", this);
48 }
49
56 public override PatternMatchResult PatternMatch(XmlNode CheckAgainst, Dictionary<string, IElement> AlreadyFound)
57 {
58 return PatternMatchResult.Match;
59 }
60
67 public override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary<string, IElement> AlreadyFound)
68 {
69 return PatternMatchResult.Match;
70 }
71
78 public override bool IsApplicable(XmlNode CheckAgainst, XmlElement First)
79 {
80 return this.next is null || !this.next.IsApplicable(CheckAgainst, null);
81 }
82
86 public override bool IsVector => true;
87
92 {
93 get => this.next;
94 internal set => this.next = value;
95 }
96 }
97}
Class managing a script expression.
Definition: Expression.cs:41
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
ScriptNode Parent
Parent node.
Definition: ScriptNode.cs:126
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Base class for all XML Script nodes in a parsed script tree.
abstract bool IsApplicable(XmlNode CheckAgainst, XmlElement First)
If the node is applicable in pattern matching against CheckAgainst .
override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
XmlScriptNode Next
Next node in the sequence, after the wildcard
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
XmlScriptWildcard(int Start, int Length, Expression Expression)
XML Script wildcard node.
override bool IsApplicable(XmlNode CheckAgainst, XmlElement First)
If the node is applicable in pattern matching against CheckAgainst .
override PatternMatchResult PatternMatch(XmlNode CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
override bool IsVector
If the node represents a vector of nodes.
Basic interface for all types of elements.
Definition: IElement.cs:21
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
PatternMatchResult
Status result of a pattern matching operation.
Definition: ScriptNode.cs:17
SearchMethod
Method to traverse the expression structure
Definition: ScriptNode.cs:38