/// <inheritdoc />
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _sponge?.DestroyHandle();
                _sponge = null;
                _taskManagerTimer?.Dispose();
                _taskManagerTimer = null;
            }

            base.Dispose(disposing);
        }
        public NativeWindowInputProvider(ILogger logger, IInputService inputService)
        {
            _logger       = logger;
            _inputService = inputService;

            _sponge = new SpongeWindow();
            _sponge.WndProcCalled += SpongeOnWndProcCalled;

            _taskManagerTimer          = new System.Timers.Timer(500);
            _taskManagerTimer.Elapsed += TaskManagerTimerOnElapsed;
            _taskManagerTimer.Start();

            RawInputDevice.RegisterDevice(HidUsageAndPage.Keyboard, RawInputDeviceFlags.InputSink, _sponge.Handle);
            RawInputDevice.RegisterDevice(HidUsageAndPage.Mouse, RawInputDeviceFlags.InputSink, _sponge.Handle);
        }