Use attribute instead of CreateChildDependencies

This commit is contained in:
Bartłomiej Dach 2020-02-22 13:47:42 +01:00
parent f248c0a98e
commit a512226036

View File

@ -15,6 +15,7 @@ using osuTK;
namespace osu.Game.Tests.Visual.Online
{
[Cached(typeof(IPreviewTrackOwner))]
public class TestSceneDirectPanel : OsuTestScene, IPreviewTrackOwner
{
public override IReadOnlyList<Type> RequiredTypes => new[]
@ -24,13 +25,6 @@ namespace osu.Game.Tests.Visual.Online
typeof(IconPill)
};
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.CacheAs<IPreviewTrackOwner>(this);
return dependencies;
}
private BeatmapSetInfo getUndownloadableBeatmapSet() => new BeatmapSetInfo
{
OnlineBeatmapSetID = 123,