Esempio n. 1
0
 public AttrListImpl(IAttrList attrs)
     : this(attrs != null ? attrs.Length : 0)
 {
     if (attrs != null)
     {
         this.CopyFrom(attrs);
     }
 }
Esempio n. 2
0
 public AttrListImpl(IAttrList attrs)
     : this(attrs?.Length ?? 0)
 {
     if (attrs != null)
     {
         CopyFrom(attrs);
     }
 }
Esempio n. 3
0
 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));
         }
     }
 }
Esempio n. 4
0
 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));
         }
     }
 }
Esempio n. 5
0
 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));
 }
Esempio n. 6
0
        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)));
            }
        }
Esempio n. 7
0
        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));
            }
        }
Esempio n. 8
0
 public void OnStartElement(string name, IAttrList attrs)
 {
 }
			public void OnStartElement(string name, IAttrList attrs) {}
			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 AttrListImpl(IAttrList attrs)
			: this(attrs != null ? attrs.Length : 0) {
				if (attrs != null) this.CopyFrom(attrs);
			}