public TrackingScope NewScope() { var current = GetCurrentRegisterScope(); var scope = new TrackingScope(current, _ => trackingScopes.Pop()); trackingScopes.Push(scope); return(scope); }
public TrackingScope(TrackingScope parent, Action <TrackingScope> onDispose) { Parent = parent; this.onDispose = onDispose; }