private void OnTimeout(object state) { if (IsCancelled) { return; } _callback(state, this); _timer?.Dispose(); _timer = null; } }