Пример #1
0
 public bool TryGetNode(TValue value, out MultiTreeNode <TValue, TConnectionWay> node)
 {
     node = null;
     if (valueToNode.ContainsKey(value))
     {
         node = valueToNode[value];
         return(true);
     }
     return(false);
 }
Пример #2
0
        internal MultiTreeNode <TValue, TConnectionWay> FindOrCreateNode(TValue value)
        {
            if (valueToNode.ContainsKey(value))
            {
                return(valueToNode[value]);
            }
            var newNode = new MultiTreeNode <TValue, TConnectionWay>(value, this);

            valueToNode.Add(value, newNode);
            return(newNode);
        }
Пример #3
0
 public void SetParent(MultiTreeNode <TValue, TConnectionWay> parentNode)
 {
     ParentsList.Add(parentNode);
 }