/// <summary>
        ///     Add a child node or cluster.  It is added to the correct list (nodes or clusters) based on type
        /// </summary>
        /// <param name="child"></param>
        public void AddChild(Node child)
        {
            ValidateArg.IsNotNull(child, "child");
            Debug.Assert(child != this);
            var childCluster = child as Cluster;

            if (childCluster != null)
            {
                clusters.Add(childCluster);
            }
            else
            {
                nodes.Add(child);
            }
            child.AddClusterParent(this);
        }
Beispiel #2
0
 /// <summary>
 ///     adding a node without checking that it is a cluster
 /// </summary>
 /// <param name="node"></param>
 internal void AddNode(Node node)
 {
     node.AddClusterParent(this);
     nodes.Add(node);
 }
 /// <summary>
 ///     adding a node without checking that it is a cluster
 /// </summary>
 /// <param name="node"></param>
 internal void AddNode(Node node) {
     node.AddClusterParent(this);
     nodes.Add(node);
 }
 /// <summary>
 ///     Add a child node or cluster.  It is added to the correct list (nodes or clusters) based on type
 /// </summary>
 /// <param name="child"></param>
 public void AddChild(Node child) {
     ValidateArg.IsNotNull(child, "child");
     Debug.Assert(child != this);
     var childCluster = child as Cluster;
     if (childCluster != null) {
         clusters.Add(childCluster);
     }
     else {
         nodes.Add(child);
     }
     child.AddClusterParent(this);
 }