예제 #1
0
파일: Graphing.cs 프로젝트: rbec/malbec
 public static int CompareTo(this IExternalNode x, IExternalNode y)
 {
   if (x.IsAncestorOf(y))
     return -1;
   if (y.IsAncestorOf(x))
     return 1;
   return 0;
 }
예제 #2
0
 protected override void ReleaseSelf()
 {
     base.ReleaseSelf();
     if (node != null)
     {
         node.OnDestroy();
     }
     node = null;
 }
예제 #3
0
 public override void Release()
 {
     base.Release();
     if (node != null)
     {
         node.OnDestroy();
     }
     node = null;
 }
예제 #4
0
파일: Graphing.cs 프로젝트: rbec/malbec
 public static bool IsAncestorOf(this IExternalNode x, IExternalNode y) => x.Descendents().Contains(y);
예제 #5
0
파일: DAG.cs 프로젝트: rbec/malbec
 public static IEnumerable<INode> LazyDescendents(IExternalNode node) => node.Subscribers.Concat(node.Subscribers.Where(n => n.React()).SelectMany(LazyDescendents)).Distinct();
예제 #6
0
 public void Set(IExternalNode node)
 {
     this.node = node;
 }