mirror of
https://github.com/ppy/osu
synced 2025-02-03 20:02:16 +00:00
Use attribute instead of CreateChildDependencies
This commit is contained in:
parent
f248c0a98e
commit
a512226036
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user