mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09: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
|
public class SkinProvidingPlayer : TestPlayer
|
||||||
{
|
{
|
||||||
|
[Cached(typeof(ISkinSource))]
|
||||||
private readonly ISkinSource skinSource;
|
private readonly ISkinSource skinSource;
|
||||||
|
|
||||||
public SkinProvidingPlayer(ISkinSource skinSource)
|
public SkinProvidingPlayer(ISkinSource skinSource)
|
||||||
{
|
{
|
||||||
this.skinSource = skinSource;
|
this.skinSource = skinSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
|
||||||
{
|
|
||||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
|
||||||
dependencies.CacheAs(skinSource);
|
|
||||||
return dependencies;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user