protected override void Invoke() { TimeoutException timeoutException; Action <object, TimeoutException> action = this.callback; object obj = this.state; if (this.TimedOut) { timeoutException = new TimeoutException(InternalSR.TimeoutOnOperation(this.originalTimeout)); } else { timeoutException = null; } action(obj, timeoutException); }
protected override void Invoke() { this.callback(this.state, this.TimedOut ? new TimeoutException(InternalSR.TimeoutOnOperation(this.originalTimeout)) : null); }