Update further usages to cache/resolve via interface

This commit is contained in:
Salman Ahmed
2022-04-19 00:18:10 +03:00
parent bb8b94f8ad
commit 94335c2938
4 changed files with 5 additions and 5 deletions

View File

@ -39,9 +39,9 @@ namespace osu.Desktop.Updater
private readonly SquirrelLogger squirrelLogger = new SquirrelLogger(); private readonly SquirrelLogger squirrelLogger = new SquirrelLogger();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(NotificationOverlay notification) private void load(INotificationOverlay notifications)
{ {
notificationOverlay = notification; notificationOverlay = notifications;
SquirrelLocator.CurrentMutable.Register(() => squirrelLogger, typeof(ILogger)); SquirrelLocator.CurrentMutable.Register(() => squirrelLogger, typeof(ILogger));
} }

View File

@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Resolved] [Resolved]
private SessionStatics sessionStatics { get; set; } private SessionStatics sessionStatics { get; set; }
[Cached] [Cached(typeof(INotificationOverlay))]
private readonly NotificationOverlay notificationOverlay; private readonly NotificationOverlay notificationOverlay;
[Cached] [Cached]

View File

@ -14,7 +14,7 @@ namespace osu.Game.Tests.Visual.Settings
{ {
public class TestSceneMigrationScreens : ScreenTestScene public class TestSceneMigrationScreens : ScreenTestScene
{ {
[Cached] [Cached(typeof(INotificationOverlay))]
private readonly NotificationOverlay notifications; private readonly NotificationOverlay notifications;
public TestSceneMigrationScreens() public TestSceneMigrationScreens()

View File

@ -124,7 +124,7 @@ namespace osu.Game.Screens.Play
private EpilepsyWarning? epilepsyWarning; private EpilepsyWarning? epilepsyWarning;
[Resolved(CanBeNull = true)] [Resolved(CanBeNull = true)]
private NotificationOverlay? notificationOverlay { get; set; } private INotificationOverlay? notificationOverlay { get; set; }
[Resolved(CanBeNull = true)] [Resolved(CanBeNull = true)]
private VolumeOverlay? volumeOverlay { get; set; } private VolumeOverlay? volumeOverlay { get; set; }