mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Cleanups and xmldoc additions
This commit is contained in:
13
osu.Game/Database/IHasFiles.cs
Normal file
13
osu.Game/Database/IHasFiles.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// A model that contains a list of files it is responsible for.
|
||||
/// </summary>
|
||||
/// <typeparam name="TFile">The model representing a file.</typeparam>
|
||||
public interface IHasFiles<TFile>
|
||||
{
|
||||
List<TFile> Files { get; set; }
|
||||
}
|
||||
}
|
@ -3,8 +3,14 @@
|
||||
|
||||
namespace osu.Game.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// A model that can be deleted from user's view without being instantly lost.
|
||||
/// </summary>
|
||||
public interface ISoftDelete
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this model is marked for future deletion.
|
||||
/// </summary>
|
||||
bool DeletePending { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -83,11 +83,7 @@ namespace osu.Game.Database
|
||||
|
||||
protected virtual IQueryable<T> AddIncludesForDeletion(IQueryable<T> query) => query;
|
||||
|
||||
protected virtual void Purge(List<T> items, OsuDbContext context)
|
||||
{
|
||||
// cascades down to beatmaps.
|
||||
context.RemoveRange(items);
|
||||
}
|
||||
protected virtual void Purge(List<T> items, OsuDbContext context) => context.RemoveRange(items);
|
||||
|
||||
/// <summary>
|
||||
/// Purge items in a pending delete state.
|
||||
|
Reference in New Issue
Block a user