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