1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Add missing methods to interfaces

This commit is contained in:
Dean Herbert 2021-10-06 12:05:11 +09:00
parent 6e797ddcac
commit 007b33cd88
3 changed files with 34 additions and 2 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Beatmaps
/// Handles ef-core storage of beatmaps.
/// </summary>
[ExcludeFromDynamicCompile]
public class BeatmapModelManager : ArchiveModelManager<BeatmapSetInfo, BeatmapSetFileInfo>
public class BeatmapModelManager : ArchiveModelManager<BeatmapSetInfo, BeatmapSetFileInfo>, IBeatmapModelManager
{
/// <summary>
/// Fired when a single difficulty has been hidden.
@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps
/// <summary>
/// The game working beatmap cache, used to invalidate entries on changes.
/// </summary>
public WorkingBeatmapCache WorkingBeatmapCache { private get; set; }
public IWorkingBeatmapCache WorkingBeatmapCache { private get; set; }
private readonly Bindable<WeakReference<BeatmapInfo>> beatmapRestored = new Bindable<WeakReference<BeatmapInfo>>();

View File

@ -0,0 +1,20 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Database;
namespace osu.Game.Beatmaps
{
public interface IBeatmapModelManager : IModelManager<BeatmapSetInfo>
{
/// <summary>
/// Provide an online lookup queue component to handle populating online beatmap metadata.
/// </summary>
BeatmapOnlineLookupQueue OnlineLookupQueue { set; }
/// <summary>
/// Provide a working beatmap cache, used to invalidate entries on changes.
/// </summary>
IWorkingBeatmapCache WorkingBeatmapCache { set; }
}
}

View File

@ -11,5 +11,17 @@ namespace osu.Game.Beatmaps
/// <param name="beatmapInfo">The beatmap to lookup.</param>
/// <returns>A <see cref="WorkingBeatmap"/> instance correlating to the provided <see cref="BeatmapInfo"/>.</returns>
WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo);
/// <summary>
/// Invalidate a cache entry if it exists.
/// </summary>
/// <param name="beatmapSetInfo">The beatmap set info to invalidate any cached entries for.</param>
void Invalidate(BeatmapSetInfo beatmapSetInfo);
/// <summary>
/// Invalidate a cache entry if it exists.
/// </summary>
/// <param name="beatmapInfo">The beatmap info to invalidate any cached entries for.</param>
void Invalidate(BeatmapInfo beatmapInfo);
}
}