Simplify caching

This commit is contained in:
smoogipoo
2019-08-13 17:38:21 +09:00
parent 92c2dafa12
commit 7c9c9f1ce1
2 changed files with 2 additions and 14 deletions

View File

@ -13,6 +13,7 @@ using osu.Framework.Allocation;
namespace osu.Game.Tests.Visual.Multiplayer
{
[Cached(typeof(IPreviewTrackOwner))]
public class TestSceneMatchBeatmapPanel : MultiplayerTestScene, IPreviewTrackOwner
{
public override IReadOnlyList<Type> RequiredTypes => new[]
@ -48,12 +49,5 @@ namespace osu.Game.Tests.Visual.Multiplayer
previewTrackManager.StopAnyPlaying(this);
});
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.CacheAs<IPreviewTrackOwner>(this);
return dependencies;
}
}
}