/// <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); }
/// <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); }
/// <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]); }
/// <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); }
/// <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(); }
/// <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); }