示例#1
0
 /// <summary>
 /// Removes the specified attribute.
 /// </summary>
 /// <param name="Attribute">The attribute to remove.</param>
 public void Remove(ZXmlAttribute Attribute)
 {
     if (_ats != null)	_ats.Remove(Attribute);
 }
示例#2
0
 /// <summary>
 /// Gets the index of specified XML attribute.
 /// </summary>
 /// <param name="Attribute">The attribute to find the index of.</param>
 /// <returns>Return the index of specified XML attribute.</returns>
 public int IndexOf(ZXmlAttribute Attribute)
 {
     return _ats.IndexOf(Attribute);
 }
示例#3
0
 /// <summary>
 /// Inserts the specified array of attriubutes at the position with specified index.
 /// </summary>
 /// <param name="Index">Index of the position where specified array of attriubutes should be inserted.</param>
 /// <param name="Attributes">The array of attriubutes to insert.</param>
 public void Add(int Index, ZXmlAttribute[] Attributes)
 {
     if (_ats == null)	_ats = new List<ZXmlAttribute>();
     Index = ZMath.GetBound(Index, 0, _ats.Count);
     for (int i = 0; i < Attributes.Length; i++)
         if (!Contains(Attributes[i].Name))	Add(Index, Attributes[i]);
 }
示例#4
0
 /// <summary>
 /// Adds the specified arrays of attriubutes at the end of this list.
 /// </summary>
 /// <param name="Attributes">The array of attriubutes to insert.</param>
 public void Add(ZXmlAttribute[] Attributes)
 {
     if (_ats != null)	 Add(_ats.Count, Attributes);	else Add(0, Attributes);
 }
示例#5
0
 /// <summary>
 /// Inserts the specified attriubute at the position with specified index.
 /// </summary>
 /// <param name="Index">Index of the position where specified attriubute should be inserted.</param>
 /// <param name="Attribute">The attriubute to insert.</param>
 /// <returns>Returns the inserted attriubute.</returns>
 public ZXmlAttribute Add(int Index, ZXmlAttribute Attribute)
 {
     if (_ats == null)	_ats = new List<ZXmlAttribute>();
     Index = ZMath.GetBound(Index, 0, _ats.Count);
     if (!Contains(Attribute.Name))
     {
         _ats.Insert(Index, Attribute);
         return Attribute;
     }
     return new ZXmlAttribute();
 }
示例#6
0
 /// <summary>
 /// Adds the specified attriubute at the end of this list.
 /// </summary>
 /// <param name="Attribute">The attriubute to add.</param>
 /// <returns>Returns the added attriubute.</returns>
 public ZXmlAttribute Add(ZXmlAttribute Attribute)
 {
     if (_ats != null)	 return Add(_ats.Count, Attribute);	  return Add(0, Attribute);
 }