Example #1
0
 internal void ClearValue() {
     this.valueBuilder.Length = 0;
     this.disableEscaping = false;
     this.nextTextInfo = null;
     this.lastTextInfo = this;
 }
Example #2
0
 internal void Initialize(string prefix, string name, string nspace) {
     this.prefix        = prefix;
     this.localName     = name;
     this.namespaceURI  = nspace;
     this.name          = null;
     this.htmlProps     = null;
     this.htmlAttrProps = null;
     this.lastTextInfo  = this;
     // TextInfo:
     this.disableEscaping = false;
     this.valueBuilder    = new StringBuilder();
     this.nextTextInfo    = null;
 }
Example #3
0
 internal void Initialize(BuilderInfo src) {
     this.prefix        = src.Prefix;
     this.localName     = src.LocalName;
     this.namespaceURI  = src.NamespaceURI;
     this.name          = null;
     this.depth         = src.Depth;
     this.nodeType      = src.NodeType;
     this.htmlProps     = src.htmlProps;
     this.htmlAttrProps = src.htmlAttrProps;
     this.lastTextInfo  = src.lastTextInfo;
     // TextInfo:
     this.disableEscaping = src.disableEscaping;
     this.valueBuilder    = src.valueBuilder;
     this.nextTextInfo    = src.nextTextInfo;
     // This not really correct to copy valueBuilder, but on next usage it will be reinitialized. The same for clone.
 }
Example #4
0
 internal void ValueAppend(string s, bool disableEscaping) {
     TextInfo last = this.lastTextInfo;
     if(last.disableEscaping == disableEscaping || last.valueBuilder.Length == 0) {
         last.valueBuilder.Append(s);
         last.disableEscaping = disableEscaping; // if the real value was empty we can override disableEscaping for this node
     }
     else {
         last.nextTextInfo = new TextInfo(s, disableEscaping);
         this.lastTextInfo = last.nextTextInfo;
     }
 }