mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 22:22:54 +08:00
Fix incorrectly specified events
This commit is contained in:
parent
96ef210a4d
commit
89cc2523ef
@ -205,16 +205,16 @@ namespace osu.Game.Beatmaps
|
||||
return beatmapModelManager.IsAvailableLocally(model);
|
||||
}
|
||||
|
||||
public Action<BeatmapSetInfo> ItemUpdated
|
||||
public event Action<BeatmapSetInfo> ItemUpdated
|
||||
{
|
||||
get => beatmapModelManager.ItemUpdated;
|
||||
set => beatmapModelManager.ItemUpdated = value;
|
||||
add => beatmapModelManager.ItemUpdated += value;
|
||||
remove => beatmapModelManager.ItemUpdated -= value;
|
||||
}
|
||||
|
||||
public Action<BeatmapSetInfo> ItemRemoved
|
||||
public event Action<BeatmapSetInfo> ItemRemoved
|
||||
{
|
||||
get => beatmapModelManager.ItemRemoved;
|
||||
set => beatmapModelManager.ItemRemoved = value;
|
||||
add => beatmapModelManager.ItemRemoved += value;
|
||||
remove => beatmapModelManager.ItemRemoved -= value;
|
||||
}
|
||||
|
||||
public Task ImportFromStableAsync(StableStorage stableStorage)
|
||||
@ -261,16 +261,16 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
#region Implementation of IModelDownloader<BeatmapSetInfo>
|
||||
|
||||
public Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadBegan
|
||||
public event Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadBegan
|
||||
{
|
||||
get => beatmapModelDownloader.DownloadBegan;
|
||||
set => beatmapModelDownloader.DownloadBegan = value;
|
||||
add => beatmapModelDownloader.DownloadBegan += value;
|
||||
remove => beatmapModelDownloader.DownloadBegan -= value;
|
||||
}
|
||||
|
||||
public Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadFailed
|
||||
public event Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadFailed
|
||||
{
|
||||
get => beatmapModelDownloader.DownloadFailed;
|
||||
set => beatmapModelDownloader.DownloadFailed = value;
|
||||
add => beatmapModelDownloader.DownloadFailed += value;
|
||||
remove => beatmapModelDownloader.DownloadFailed -= value;
|
||||
}
|
||||
|
||||
public bool Download(IBeatmapSetInfo model, bool minimiseDownloadSize = false)
|
||||
|
@ -62,13 +62,13 @@ namespace osu.Game.Database
|
||||
/// Fired when a new or updated <typeparamref name="TModel"/> becomes available in the database.
|
||||
/// This is not guaranteed to run on the update thread.
|
||||
/// </summary>
|
||||
public Action<TModel> ItemUpdated { get; set; }
|
||||
public event Action<TModel> ItemUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a <typeparamref name="TModel"/> is removed from the database.
|
||||
/// This is not guaranteed to run on the update thread.
|
||||
/// </summary>
|
||||
public Action<TModel> ItemRemoved { get; set; }
|
||||
public event Action<TModel> ItemRemoved;
|
||||
|
||||
public virtual IEnumerable<string> HandledExtensions => new[] { @".zip" };
|
||||
|
||||
|
@ -17,13 +17,13 @@ namespace osu.Game.Database
|
||||
/// Fired when a <typeparamref name="T"/> download begins.
|
||||
/// This is NOT run on the update thread and should be scheduled.
|
||||
/// </summary>
|
||||
Action<ArchiveDownloadRequest<T>> DownloadBegan { get; set; }
|
||||
event Action<ArchiveDownloadRequest<T>> DownloadBegan;
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a <typeparamref name="T"/> download is interrupted, either due to user cancellation or failure.
|
||||
/// This is NOT run on the update thread and should be scheduled.
|
||||
/// </summary>
|
||||
Action<ArchiveDownloadRequest<T>> DownloadFailed { get; set; }
|
||||
event Action<ArchiveDownloadRequest<T>> DownloadFailed;
|
||||
|
||||
/// <summary>
|
||||
/// Begin a download for the requested <typeparamref name="T"/>.
|
||||
|
@ -19,12 +19,12 @@ namespace osu.Game.Database
|
||||
/// <summary>
|
||||
/// Fired when an item is updated.
|
||||
/// </summary>
|
||||
Action<TModel> ItemUpdated { get; set; }
|
||||
event Action<TModel> ItemUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Fired when an item is removed.
|
||||
/// </summary>
|
||||
Action<TModel> ItemRemoved { get; set; }
|
||||
event Action<TModel> ItemRemoved;
|
||||
|
||||
/// <summary>
|
||||
/// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future.
|
||||
|
@ -19,9 +19,9 @@ namespace osu.Game.Database
|
||||
{
|
||||
public Action<Notification> PostNotification { protected get; set; }
|
||||
|
||||
public Action<ArchiveDownloadRequest<T>> DownloadBegan { get; set; }
|
||||
public event Action<ArchiveDownloadRequest<T>> DownloadBegan;
|
||||
|
||||
public Action<ArchiveDownloadRequest<T>> DownloadFailed { get; set; }
|
||||
public event Action<ArchiveDownloadRequest<T>> DownloadFailed;
|
||||
|
||||
private readonly IModelImporter<TModel> importer;
|
||||
private readonly IAPIProvider api;
|
||||
|
@ -246,16 +246,16 @@ namespace osu.Game.Scoring
|
||||
|
||||
#region Implementation of IModelManager<ScoreInfo>
|
||||
|
||||
public Action<ScoreInfo> ItemUpdated
|
||||
public event Action<ScoreInfo> ItemUpdated
|
||||
{
|
||||
get => scoreModelManager.ItemUpdated;
|
||||
set => scoreModelManager.ItemUpdated = value;
|
||||
add => scoreModelManager.ItemUpdated += value;
|
||||
remove => scoreModelManager.ItemUpdated -= value;
|
||||
}
|
||||
|
||||
public Action<ScoreInfo> ItemRemoved
|
||||
public event Action<ScoreInfo> ItemRemoved
|
||||
{
|
||||
get => scoreModelManager.ItemRemoved;
|
||||
set => scoreModelManager.ItemRemoved = value;
|
||||
add => scoreModelManager.ItemRemoved += value;
|
||||
remove => scoreModelManager.ItemRemoved -= value;
|
||||
}
|
||||
|
||||
public Task ImportFromStableAsync(StableStorage stableStorage)
|
||||
@ -358,16 +358,16 @@ namespace osu.Game.Scoring
|
||||
|
||||
#region Implementation of IModelDownloader<IScoreInfo>
|
||||
|
||||
public Action<ArchiveDownloadRequest<IScoreInfo>> DownloadBegan
|
||||
public event Action<ArchiveDownloadRequest<IScoreInfo>> DownloadBegan
|
||||
{
|
||||
get => scoreModelDownloader.DownloadBegan;
|
||||
set => scoreModelDownloader.DownloadBegan = value;
|
||||
add => scoreModelDownloader.DownloadBegan += value;
|
||||
remove => scoreModelDownloader.DownloadBegan -= value;
|
||||
}
|
||||
|
||||
public Action<ArchiveDownloadRequest<IScoreInfo>> DownloadFailed
|
||||
public event Action<ArchiveDownloadRequest<IScoreInfo>> DownloadFailed
|
||||
{
|
||||
get => scoreModelDownloader.DownloadFailed;
|
||||
set => scoreModelDownloader.DownloadFailed = value;
|
||||
add => scoreModelDownloader.DownloadFailed += value;
|
||||
remove => scoreModelDownloader.DownloadFailed -= value;
|
||||
}
|
||||
|
||||
public bool Download(IScoreInfo model, bool minimiseDownloadSize) =>
|
||||
|
Loading…
Reference in New Issue
Block a user