예제 #1
0
        public void WatcherDoesNotThrowWhenDisposingTwice()
        {
            var watcher = new StatusWatcher(_jf);

#pragma warning disable IDISP016, IDISP017
            watcher.Dispose();
            watcher.Dispose();
#pragma warning restore IDISP016, IDISP017
        }
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            Stop();

            _journalWatcher.Dispose();
            _statusWatcher.Dispose();
            _bindingsWatcher.Dispose();
            _graphicsConfig.Dispose();
            _modifierKeysWatcher.Dispose();
            _gameProcessWatcher.Dispose();

            _disposed = true;
        }