/// <summary> /// Removes a child element from the composite. /// </summary> /// <param name="component">The child component.</param> public void Remove(IVisitableComponent component) { _children.Remove(component); }
/// <summary> /// Unimplemented method. Can't remove a children from a leaf component. /// </summary> /// <param name="component">The child component.</param> public void Remove(IVisitableComponent component) { throw new InvalidOperationException("Impossible to remove children from a leaf."); }
/// <summary> /// Adds a child element to the composite. /// </summary> /// <param name="component">The child component.</param> public void Add(IVisitableComponent component) { _children.Add(component); }
/// <summary> /// Unimplemented method. Can't add a children to a leaf component. /// </summary> /// <param name="component">The child component.</param> public void Add(IVisitableComponent component) { throw new InvalidOperationException("Impossible to add children to a leaf."); }