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 @@ public class BeatmapModelManager : ArchiveModelManager<BeatmapSetInfo, BeatmapSe
/// <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 @@ public interface IWorkingBeatmapCache
/// <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);
}
}