13 private readonly
string text;
14 private readonly
bool isWhitespace;
27 this.isWhitespace =
string.IsNullOrWhiteSpace(
Text);
33 public string Text => this.text;
48 Parent.AppendChild(Document.CreateTextNode(
this.text));
59 if (CheckAgainst is XmlText ||
60 CheckAgainst is XmlCDataSection ||
61 CheckAgainst is XmlWhitespace ||
62 CheckAgainst is XmlSignificantWhitespace)
64 return CheckAgainst.InnerText.Trim() == this.text.Trim() ? PatternMatchResult.Match :
PatternMatchResult.NoMatch;
66 else if (CheckAgainst is
null)
67 return string.IsNullOrWhiteSpace(this.text) ? PatternMatchResult.Match :
PatternMatchResult.NoMatch;
78 public override bool IsApplicable(XmlNode CheckAgainst, XmlElement First)
80 return CheckAgainst is XmlText ||
81 CheckAgainst is XmlCDataSection ||
82 CheckAgainst is XmlWhitespace ||
83 CheckAgainst is XmlSignificantWhitespace;
Class managing a script expression.
int Length
Length of expression covered by node.
ScriptNode Parent
Parent node.
int Start
Start position in script expression.
Base class for all XML Script leaf nodes in a parsed script tree.
override bool IsApplicable(XmlNode CheckAgainst, XmlElement First)
If the node is applicable in pattern matching against CheckAgainst .
override bool IsWhitespace
If the node represents whitespace.
XmlScriptText(string Text, int Start, int Length, Expression Expression)
XML Script text node.
string Text
Text represented by node.
override PatternMatchResult PatternMatch(XmlNode CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
PatternMatchResult
Status result of a pattern matching operation.