public TimeoutDelegateCancelPayload(TimeoutDelegatePayload timeoutPayload, Delegate onCancelTimeoutMethod = null, params object[] onCancelTimeoutMethodArgs) : base(onCancelTimeoutMethod, onCancelTimeoutMethodArgs) { ArgumentValidator.AssertNotNull(timeoutPayload, "timeoutPayload"); TimeoutPayload = timeoutPayload; }
private void OnTimeoutRegistration(TimeoutDelegatePayload arg) { try { ArgumentValidator.AssertNotNull(arg, "arg"); ArgumentValidator.AssertNotNull(arg.Method, "arg.Method"); arg.TimeoutStartTime = DateTime.Now; Items.Add(arg); } finally { if (Items.Count > 0) { Timer.StartTimer(); } } }