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