/// <summary> /// Adds a specified box to the current instance. /// </summary> /// <param name="box"> /// A <see cref="Box" /> object to add to the current /// instance. /// </param> public void AddChild (Box box) { ICollection<Box> children = Children as ICollection<Box>; if (children != null) children.Add (box); }
/* /// <summary> /// Removes all children with a specified box type from the /// current instance. /// </summary> /// <param name="type"> /// A <see cref="ByteVector" /> object containing the box /// type to remove. /// </param> public void RemoveChild (System.Type type) { ICollection<Box> children = Children as ICollection<Box>; if (children == null) return; foreach (Box b in new List<Box> (children)) if (b.GetType () == type) children.Remove (b); } */ /// <summary> /// Removes a specified box from the current instance. /// </summary> /// <param name="box"> /// A <see cref="Box" /> object to remove from the current /// instance. /// </param> public void RemoveChild (Box box) { ICollection<Box> children = Children as ICollection<Box>; if (children != null) children.Remove (box); }