示例#1
0
            public SuspendDisposer(Suspender suspender)
            {
                this.suspender = suspender;
                if (Interlocked.Increment(ref this.suspender.suspendCount) != 1)
                {
                    return;
                }
                Action action = this.suspender.suspensionActivatedAction;

                if (action == null)
                {
                    return;
                }
                action();
            }
 public SuspendingEventManager(Action <TEventArgs> eventInvoker)
 {
     this.eventInvoker = eventInvoker;
     this.suspender    = new Suspender(new Action(this.ForwardEvents), (Action)null);
 }