// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Concurrent; using osu.Game.Rulesets; using osu.Game.Rulesets.Configuration; namespace osu.Game.Tests.Rulesets { /// /// Test implementation of a , which ensures isolation between test scenes. /// public class TestRulesetConfigCache : IRulesetConfigCache { private readonly ConcurrentDictionary configCache = new ConcurrentDictionary(); public IRulesetConfigManager? GetConfigFor(Ruleset ruleset) => configCache.GetOrAdd(ruleset.ShortName, _ => ruleset.CreateConfig(null)); } }