Beispiel #1
0
 public VisQuery.TryResult TryRemove(VisNode self, VisNode other)
 {
     if (!this.applicable.Remove(other))
     {
         return(VisQuery.TryResult.Outside);
     }
     VisQuery.Instance instance = this;
     instance.num = instance.num - 1;
     return(VisQuery.TryResult.Exit);
 }
Beispiel #2
0
        public void ExecuteExit(VisNode self, VisNode other)
        {
            VisQuery.Instance instance = this;
            int num  = instance.execNum - 1;
            int num1 = num;

            instance.execNum = num;
            if (num1 == 0 || !this.outer.nonInstance)
            {
                this.outer.Exit(self, other);
            }
        }
Beispiel #3
0
 public VisQuery.TryResult TryAdd(VisNode self, VisNode other)
 {
     if (!this.outer.Try(self, other))
     {
         return(this.TryRemove(self, other));
     }
     if (!this.applicable.Add(other))
     {
         return(VisQuery.TryResult.Stay);
     }
     VisQuery.Instance instance = this;
     instance.num = instance.num + 1;
     return(VisQuery.TryResult.Enter);
 }
Beispiel #4
0
 public void Clear(VisNode self)
 {
     while (true)
     {
         VisQuery.Instance instance = this;
         int num  = instance.num - 1;
         int num1 = num;
         instance.num = num;
         if (num1 < 0)
         {
             break;
         }
         HSetIter <VisNode> enumerator = this.applicable.GetEnumerator();
         enumerator.MoveNext();
         VisNode current = enumerator.Current;
         enumerator.Dispose();
         this.TryRemove(self, current);
     }
 }