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:
parent
b5e43144a9
commit
4f17e3520e
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user