1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 12:22:57 +08:00

Fix incorrectly specified events

This commit is contained in:
Dean Herbert 2021-11-06 22:31:49 +09:00
parent 96ef210a4d
commit 89cc2523ef
6 changed files with 32 additions and 32 deletions

View File

@ -205,16 +205,16 @@ namespace osu.Game.Beatmaps
return beatmapModelManager.IsAvailableLocally(model); return beatmapModelManager.IsAvailableLocally(model);
} }
public Action<BeatmapSetInfo> ItemUpdated public event Action<BeatmapSetInfo> ItemUpdated
{ {
get => beatmapModelManager.ItemUpdated; add => beatmapModelManager.ItemUpdated += value;
set => beatmapModelManager.ItemUpdated = value; remove => beatmapModelManager.ItemUpdated -= value;
} }
public Action<BeatmapSetInfo> ItemRemoved public event Action<BeatmapSetInfo> ItemRemoved
{ {
get => beatmapModelManager.ItemRemoved; add => beatmapModelManager.ItemRemoved += value;
set => beatmapModelManager.ItemRemoved = value; remove => beatmapModelManager.ItemRemoved -= value;
} }
public Task ImportFromStableAsync(StableStorage stableStorage) public Task ImportFromStableAsync(StableStorage stableStorage)
@ -261,16 +261,16 @@ namespace osu.Game.Beatmaps
#region Implementation of IModelDownloader<BeatmapSetInfo> #region Implementation of IModelDownloader<BeatmapSetInfo>
public Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadBegan public event Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadBegan
{ {
get => beatmapModelDownloader.DownloadBegan; add => beatmapModelDownloader.DownloadBegan += value;
set => beatmapModelDownloader.DownloadBegan = value; remove => beatmapModelDownloader.DownloadBegan -= value;
} }
public Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadFailed public event Action<ArchiveDownloadRequest<IBeatmapSetInfo>> DownloadFailed
{ {
get => beatmapModelDownloader.DownloadFailed; add => beatmapModelDownloader.DownloadFailed += value;
set => beatmapModelDownloader.DownloadFailed = value; remove => beatmapModelDownloader.DownloadFailed -= value;
} }
public bool Download(IBeatmapSetInfo model, bool minimiseDownloadSize = false) public bool Download(IBeatmapSetInfo model, bool minimiseDownloadSize = false)

View File

@ -62,13 +62,13 @@ namespace osu.Game.Database
/// Fired when a new or updated <typeparamref name="TModel"/> becomes available in the 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. /// This is not guaranteed to run on the update thread.
/// </summary> /// </summary>
public Action<TModel> ItemUpdated { get; set; } public event Action<TModel> ItemUpdated;
/// <summary> /// <summary>
/// Fired when a <typeparamref name="TModel"/> is removed from the database. /// Fired when a <typeparamref name="TModel"/> is removed from the database.
/// This is not guaranteed to run on the update thread. /// This is not guaranteed to run on the update thread.
/// </summary> /// </summary>
public Action<TModel> ItemRemoved { get; set; } public event Action<TModel> ItemRemoved;
public virtual IEnumerable<string> HandledExtensions => new[] { @".zip" }; public virtual IEnumerable<string> HandledExtensions => new[] { @".zip" };

View File

@ -17,13 +17,13 @@ namespace osu.Game.Database
/// Fired when a <typeparamref name="T"/> download begins. /// Fired when a <typeparamref name="T"/> download begins.
/// This is NOT run on the update thread and should be scheduled. /// This is NOT run on the update thread and should be scheduled.
/// </summary> /// </summary>
Action<ArchiveDownloadRequest<T>> DownloadBegan { get; set; } event Action<ArchiveDownloadRequest<T>> DownloadBegan;
/// <summary> /// <summary>
/// Fired when a <typeparamref name="T"/> download is interrupted, either due to user cancellation or failure. /// 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. /// This is NOT run on the update thread and should be scheduled.
/// </summary> /// </summary>
Action<ArchiveDownloadRequest<T>> DownloadFailed { get; set; } event Action<ArchiveDownloadRequest<T>> DownloadFailed;
/// <summary> /// <summary>
/// Begin a download for the requested <typeparamref name="T"/>. /// Begin a download for the requested <typeparamref name="T"/>.

View File

@ -19,12 +19,12 @@ namespace osu.Game.Database
/// <summary> /// <summary>
/// Fired when an item is updated. /// Fired when an item is updated.
/// </summary> /// </summary>
Action<TModel> ItemUpdated { get; set; } event Action<TModel> ItemUpdated;
/// <summary> /// <summary>
/// Fired when an item is removed. /// Fired when an item is removed.
/// </summary> /// </summary>
Action<TModel> ItemRemoved { get; set; } event Action<TModel> ItemRemoved;
/// <summary> /// <summary>
/// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future. /// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future.

View File

@ -19,9 +19,9 @@ namespace osu.Game.Database
{ {
public Action<Notification> PostNotification { protected get; set; } 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 IModelImporter<TModel> importer;
private readonly IAPIProvider api; private readonly IAPIProvider api;

View File

@ -246,16 +246,16 @@ namespace osu.Game.Scoring
#region Implementation of IModelManager<ScoreInfo> #region Implementation of IModelManager<ScoreInfo>
public Action<ScoreInfo> ItemUpdated public event Action<ScoreInfo> ItemUpdated
{ {
get => scoreModelManager.ItemUpdated; add => scoreModelManager.ItemUpdated += value;
set => scoreModelManager.ItemUpdated = value; remove => scoreModelManager.ItemUpdated -= value;
} }
public Action<ScoreInfo> ItemRemoved public event Action<ScoreInfo> ItemRemoved
{ {
get => scoreModelManager.ItemRemoved; add => scoreModelManager.ItemRemoved += value;
set => scoreModelManager.ItemRemoved = value; remove => scoreModelManager.ItemRemoved -= value;
} }
public Task ImportFromStableAsync(StableStorage stableStorage) public Task ImportFromStableAsync(StableStorage stableStorage)
@ -358,16 +358,16 @@ namespace osu.Game.Scoring
#region Implementation of IModelDownloader<IScoreInfo> #region Implementation of IModelDownloader<IScoreInfo>
public Action<ArchiveDownloadRequest<IScoreInfo>> DownloadBegan public event Action<ArchiveDownloadRequest<IScoreInfo>> DownloadBegan
{ {
get => scoreModelDownloader.DownloadBegan; add => scoreModelDownloader.DownloadBegan += value;
set => scoreModelDownloader.DownloadBegan = value; remove => scoreModelDownloader.DownloadBegan -= value;
} }
public Action<ArchiveDownloadRequest<IScoreInfo>> DownloadFailed public event Action<ArchiveDownloadRequest<IScoreInfo>> DownloadFailed
{ {
get => scoreModelDownloader.DownloadFailed; add => scoreModelDownloader.DownloadFailed += value;
set => scoreModelDownloader.DownloadFailed = value; remove => scoreModelDownloader.DownloadFailed -= value;
} }
public bool Download(IScoreInfo model, bool minimiseDownloadSize) => public bool Download(IScoreInfo model, bool minimiseDownloadSize) =>