Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
 /// <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());
 }