mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Extract update into PreUpdate(), add test
This commit is contained in:
@ -430,10 +430,20 @@ namespace osu.Game.Database
|
||||
{
|
||||
item.Hash = computeHash(item);
|
||||
|
||||
PreUpdate(item);
|
||||
|
||||
ModelStore.Update(item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform any final actions before the update to database executes.
|
||||
/// </summary>
|
||||
/// <param name="item">The <typeparamref name="TModel"/> that is being updated.</param>
|
||||
protected virtual void PreUpdate(TModel item)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete an item from the manager.
|
||||
/// Is a no-op for already deleted items.
|
||||
|
Reference in New Issue
Block a user