/// <summary> /// Returns true if the node has the dependee of sNode. /// </summary> public bool HasDependee(DependencyNode sNode) { return(_linkedDependees.ContainsKey(sNode.ToString())); }
/// <summary> /// Returns true if the node has the dependency of tNode. /// </summary> public bool HasDependency(DependencyNode tNode) { return(_linkedDependency.ContainsKey(tNode.ToString())); }
/// <summary> /// Removes dependee from this /// </summary> /// <param name="dependee">The node to be removed from the Dependees.</param> /// <returns>True if the node was successfully removed from the set, false otherwise.</returns> public bool RemoveDependee(DependencyNode dependee) { return(Dependees.Remove(dependee)); }
/// <summary> /// Removes dependent from this /// </summary> /// <param name="dependent">The node to be removed from the Dependents.</param> /// <returns>True if the node was successfully removed from the set, false otherwise.</returns> public bool RemoveDependent(DependencyNode dependent) { return(Dependents.Remove(dependent)); }
/// <summary> /// Adds dependee to this /// </summary> /// <param name="dependee">The node to be added.</param> /// <returns>True if the node was successfully added, false otherwise.</returns> public bool AddDependee(DependencyNode dependee) { // HashSet does not allow duplicates. return(Dependees.Add(dependee)); }
/// <summary> /// Constructs this to be a "copy" of node /// </summary> /// <param name="node">The node to be copied.</param> public DependencyNode(DependencyNode node) : this(node.Name) { }