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); }
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); } }
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); }
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); } }