Aqueduct.Common.DelayedExecutor.DelayedExecutor C# (CSharp) Method

DelayedExecutor() public method

public DelayedExecutor ( System.Action methodToExecute, System.TimeSpan delay ) : System
methodToExecute System.Action
delay System.TimeSpan
return System
        public DelayedExecutor (Action methodToExecute, TimeSpan delay)
        {
            if (methodToExecute == null)
                throw new ArgumentNullException ("methodToExecute",
                                                 "Cannot create a DelayedExecutor if methodToExecute is null");
            _methodToExecute = methodToExecute;

            _timer = new Timer (DisableTimeAndExecuteEvent, null, TimeSpan.Zero, delay);
        }