System.Waf.Foundation.ThrottledAction.ThrottledAction C# (CSharp) Method

ThrottledAction() public method

Initializes a new instance of the ThrottledAction class.
The argument action must not be null.
public ThrottledAction ( Action action, ThrottledActionMode mode, TimeSpan delayTime ) : System.Threading
action Action The action that should be throttled.
mode ThrottledActionMode Defines the throttling mode.
delayTime TimeSpan The delay time.
return System.Threading
        public ThrottledAction(Action action, ThrottledActionMode mode, TimeSpan delayTime)
        {
            if (action == null) { throw new ArgumentNullException(nameof(action)); }
            this.taskScheduler = SynchronizationContext.Current != null ? TaskScheduler.FromCurrentSynchronizationContext() : TaskScheduler.Default;
            this.timer = new Timer(TimerCallback, null, Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);
            this.action = action;
            this.mode = mode;
            this.delayTime = delayTime;
        }

Same methods

ThrottledAction::ThrottledAction ( Action action ) : System.Threading