예제 #1
0
        /// <summary>
        /// Make an exact copy of this object using the cloneable interface.
        /// </summary>
        /// <returns>A new object that is a clone of the specified object.</returns>
        public override Object Clone()
        {
            AttributeList rtn = new AttributeList();

            for (int i = 0; i < m_list.Count; i++)
            {
                rtn.Add((Attribute)this[i].Clone());
            }

            return(rtn);
        }
예제 #2
0
        public Tag GetTag()
        {
            AttributeList attributes = new AttributeList();

            foreach (Attribute x in List)
            {
                attributes.Add((Attribute)x.Clone());
            }

            Tag retVal = new Tag(m_tag, attributes);

            return(retVal);
        }
예제 #3
0
파일: Tag.cs 프로젝트: zhhoxi0113/sprajax
        public Tag(string name, AttributeList attributes)
        {
            if (name == null)
            {
                throw new ArgumentException("name cannot be null");
            }
            if (attributes == null)
            {
                throw new ArgumentException("attributes cannot be null");
            }

            this._name       = name;
            this._attributes = attributes;
        }