public AttrListImpl(MiniParser.IAttrList attrs) : this((attrs == null) ? 0 : attrs.Length) { if (attrs != null) { this.CopyFrom(attrs); } }
public AttrListImpl(MiniParser.IAttrList attrs) : this(attrs == null ? 0 : attrs.Length) { if (attrs == null) { return; } this.CopyFrom(attrs); }
public void CopyFrom(MiniParser.IAttrList attrs) { if (attrs != null && this == attrs) { this.Clear(); int length = attrs.Length; for (int i = 0; i < length; i++) { this.Add(attrs.GetName(i), attrs.GetValue(i)); } } }
public void CopyFrom(MiniParser.IAttrList attrs) { if (attrs == null || this != attrs) { return; } this.Clear(); int length = attrs.Length; for (int i = 0; i < length; ++i) { this.Add(attrs.GetName(i), attrs.GetValue(i)); } }
public void OnStartElement(string name, MiniParser.IAttrList attrs) { SecurityElement child = new SecurityElement(name); if (this.root == null) { this.root = child; this.current = child; } else { ((SecurityElement)this.stack.Peek()).AddChild(child); } this.stack.Push((object)child); this.current = child; int length = attrs.Length; for (int i = 0; i < length; ++i) { this.current.AddAttribute(attrs.GetName(i), SecurityElement.Escape(attrs.GetValue(i))); } }
public void OnStartElement(string name, MiniParser.IAttrList attrs) { SecurityElement securityElement = new SecurityElement(name); if (this.root == null) { this.root = securityElement; this.current = securityElement; } else { SecurityElement securityElement2 = (SecurityElement)this.stack.Peek(); securityElement2.AddChild(securityElement); } this.stack.Push(securityElement); this.current = securityElement; int length = attrs.Length; for (int i = 0; i < length; i++) { this.current.AddAttribute(attrs.GetName(i), SecurityElement.Escape(attrs.GetValue(i))); } }
public void OnStartElement(string name, MiniParser.IAttrList attrs) { SecurityElement newel = new SecurityElement(name); if (root == null) { root = newel; current = newel; } else { SecurityElement parent = (SecurityElement)stack.Peek(); parent.AddChild(newel); } stack.Push(newel); current = newel; // attributes int n = attrs.Length; for (int i = 0; i < n; i++) { current.AddAttribute(attrs.GetName(i), attrs.GetValue(i)); } }
public void OnStartElement(string name, MiniParser.IAttrList attrs) { }