예제 #1
0
        public async ValueTask DisposeAsync()
        {
            if (_cleanupTimer is not null)
            {
                await _cleanupTimer.DisposeAsync();
            }

            if (Commands is not null)
            {
                await Commands.DisposeAsync();
            }

            if (_db is not null)
            {
                _logger.LogTrace("Closing connection to SQLite database at {SqliteCacheDbPath}", _config.CachePath);
                await _db.CloseAsync();

                await _db.DisposeAsync();
            }
        }