1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Use Cached attribute

This commit is contained in:
ekrctb 2020-12-01 09:38:19 +09:00
parent b5e43144a9
commit 4f17e3520e

View File

@ -28,19 +28,13 @@ namespace osu.Game.Rulesets.Catch.Tests
public class SkinProvidingPlayer : TestPlayer
{
[Cached(typeof(ISkinSource))]
private readonly ISkinSource skinSource;
public SkinProvidingPlayer(ISkinSource skinSource)
{
this.skinSource = skinSource;
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.CacheAs(skinSource);
return dependencies;
}
}
}
}