mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Add BeatmapLookupCache as another dependency
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Game.Database;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay;
|
using osu.Game.Screens.OnlinePlay;
|
||||||
|
|
||||||
@ -36,5 +37,10 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
/// The cached <see cref="UserLookupCache"/>.
|
/// The cached <see cref="UserLookupCache"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
TestUserLookupCache UserLookupCache { get; }
|
TestUserLookupCache UserLookupCache { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The cached <see cref="BeatmapLookupCache"/>.
|
||||||
|
/// </summary>
|
||||||
|
BeatmapLookupCache BeatmapLookupCache { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Database;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay;
|
using osu.Game.Screens.OnlinePlay;
|
||||||
@ -23,6 +24,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
public OngoingOperationTracker OngoingOperationTracker => OnlinePlayDependencies?.OngoingOperationTracker;
|
public OngoingOperationTracker OngoingOperationTracker => OnlinePlayDependencies?.OngoingOperationTracker;
|
||||||
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker => OnlinePlayDependencies?.AvailabilityTracker;
|
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker => OnlinePlayDependencies?.AvailabilityTracker;
|
||||||
public TestUserLookupCache UserLookupCache => OnlinePlayDependencies?.UserLookupCache;
|
public TestUserLookupCache UserLookupCache => OnlinePlayDependencies?.UserLookupCache;
|
||||||
|
public BeatmapLookupCache BeatmapLookupCache => OnlinePlayDependencies?.BeatmapLookupCache;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All dependencies required for online play components and screens.
|
/// All dependencies required for online play components and screens.
|
||||||
|
@ -24,6 +24,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker { get; }
|
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker { get; }
|
||||||
public TestRoomRequestsHandler RequestsHandler { get; }
|
public TestRoomRequestsHandler RequestsHandler { get; }
|
||||||
public TestUserLookupCache UserLookupCache { get; }
|
public TestUserLookupCache UserLookupCache { get; }
|
||||||
|
public BeatmapLookupCache BeatmapLookupCache { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All cached dependencies which are also <see cref="Drawable"/> components.
|
/// All cached dependencies which are also <see cref="Drawable"/> components.
|
||||||
@ -41,6 +42,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
AvailabilityTracker = new OnlinePlayBeatmapAvailabilityTracker();
|
AvailabilityTracker = new OnlinePlayBeatmapAvailabilityTracker();
|
||||||
RoomManager = CreateRoomManager();
|
RoomManager = CreateRoomManager();
|
||||||
UserLookupCache = new TestUserLookupCache();
|
UserLookupCache = new TestUserLookupCache();
|
||||||
|
BeatmapLookupCache = new BeatmapLookupCache();
|
||||||
|
|
||||||
dependencies = new DependencyContainer(new CachedModelDependencyContainer<Room>(null) { Model = { BindTarget = SelectedRoom } });
|
dependencies = new DependencyContainer(new CachedModelDependencyContainer<Room>(null) { Model = { BindTarget = SelectedRoom } });
|
||||||
|
|
||||||
@ -51,6 +53,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
CacheAs(AvailabilityTracker);
|
CacheAs(AvailabilityTracker);
|
||||||
CacheAs(new OverlayColourProvider(OverlayColourScheme.Plum));
|
CacheAs(new OverlayColourProvider(OverlayColourScheme.Plum));
|
||||||
CacheAs<UserLookupCache>(UserLookupCache);
|
CacheAs<UserLookupCache>(UserLookupCache);
|
||||||
|
CacheAs(BeatmapLookupCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Get(Type type)
|
public object Get(Type type)
|
||||||
|
Reference in New Issue
Block a user