/// <summary> /// Add a base tag /// </summary> /// <param name="value">base tag to add</param> /// <returns>base tag added</returns> public Component Add(Component value) { List.Add(value as object); return value; }
/// <summary> /// Add an array of component /// </summary> /// <param name="values">swf array</param> public void AddRange(Component[] values) { foreach(Component ip in values) Add(ip); }
/// <summary> /// Convert collection to array /// </summary> /// <returns>component array</returns> public Component[] ToArray() { Component[] res = null; if (this.Count > 0) { res = new Component[this.Count]; for (int i = 0; i < this.Count; i++) res[i] = this[i]; } return res; }
/// <summary> /// Remove a component /// </summary> /// <param name="value"></param> public void Remove(Component value) { if (List.Contains(value)) List.Remove(value as object); }
/// <summary> /// Insert a component at /// </summary> /// <param name="index">index</param> /// <param name="value">swf</param> public void Insert(int index, Component value) { List.Insert(index, value as object); }
/// <summary> /// Get index of a component /// </summary> /// <param name="value">component</param> /// <returns>swf index if is contain, -1 else.</returns> public int IndexOf(Component value) { return List.IndexOf(value); }
/// <summary> /// Test if list contain a component /// </summary> /// <param name="value">component</param> /// <returns>contain result</returns> public bool Contains(Component value) { return List.Contains(value as object); }