Ejemplo n.º 1
0
        public static HashSet <GraphReference> ChildrenOfPooled(IGraphParent parent)
        {
            Ensure.That(nameof(parent)).IsNotNull(parent);

            lock (@lock)
            {
                if (byParent.TryGetValue(parent, out var instances))
                {
                    // Debug.Log($"Found {instances.Count} instances of {parent.ToSafeString()}\n{instances.ToLineSeparatedString()}");

                    return(instances.ToHashSetPooled());
                }
                else
                {
                    // Debug.Log($"Found no instances of {parent.ToSafeString()}.\n");

                    return(HashSetPool <GraphReference> .New());
                }
            }
        }
Ejemplo n.º 2
0
 public RecursionNode(IUnitPort port, GraphPointer pointer)
 {
     this.port    = port;
     this.context = pointer.parent;
 }