/// <summary> /// Adds a dependency to this object's children /// </summary> /// <param name="dependency"></param> public void Add(ADependency dependency) { var child = dependency; child._parent = this; this._children.Add(child); }
/// <summary> /// Removes and orphans the dependency from this object's children /// </summary> /// <param name="dependency"></param> public void Remove(ADependency dependency) { var child = dependency; child._parent = null; this._children.Remove(child); }
/// <summary> /// Checks this object to see if it has children /// </summary> /// <param name="child"></param> /// <returns></returns> protected Boolean HasChildren(ADependency child) { return(child.Children != null && child.Children.Any()); }