diff --git a/osu.Game/Beatmaps/BeatmapSetInfo.cs b/osu.Game/Beatmaps/BeatmapSetInfo.cs index 79983becb0..1736e3fa90 100644 --- a/osu.Game/Beatmaps/BeatmapSetInfo.cs +++ b/osu.Game/Beatmaps/BeatmapSetInfo.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using osu.Game.Database; -using osu.Game.IO; namespace osu.Game.Beatmaps { diff --git a/osu.Game/Database/IHasFiles.cs b/osu.Game/Database/IHasFiles.cs new file mode 100644 index 0000000000..cae8ea66ef --- /dev/null +++ b/osu.Game/Database/IHasFiles.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace osu.Game.Database +{ + /// + /// A model that contains a list of files it is responsible for. + /// + /// The model representing a file. + public interface IHasFiles + { + List Files { get; set; } + } +} diff --git a/osu.Game/Database/ISoftDelete.cs b/osu.Game/Database/ISoftDelete.cs index 19510421c4..c884d7af00 100644 --- a/osu.Game/Database/ISoftDelete.cs +++ b/osu.Game/Database/ISoftDelete.cs @@ -3,8 +3,14 @@ namespace osu.Game.Database { + /// + /// A model that can be deleted from user's view without being instantly lost. + /// public interface ISoftDelete { + /// + /// Whether this model is marked for future deletion. + /// bool DeletePending { get; set; } } } diff --git a/osu.Game/Database/MutableDatabaseBackedStore.cs b/osu.Game/Database/MutableDatabaseBackedStore.cs index 3905942c8c..96bc48fd8a 100644 --- a/osu.Game/Database/MutableDatabaseBackedStore.cs +++ b/osu.Game/Database/MutableDatabaseBackedStore.cs @@ -83,11 +83,7 @@ namespace osu.Game.Database protected virtual IQueryable AddIncludesForDeletion(IQueryable query) => query; - protected virtual void Purge(List items, OsuDbContext context) - { - // cascades down to beatmaps. - context.RemoveRange(items); - } + protected virtual void Purge(List items, OsuDbContext context) => context.RemoveRange(items); /// /// Purge items in a pending delete state. diff --git a/osu.Game/IO/IHasFiles.cs b/osu.Game/IO/IHasFiles.cs deleted file mode 100644 index df313b4eae..0000000000 --- a/osu.Game/IO/IHasFiles.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace osu.Game.IO -{ - public interface IHasFiles - { - List Files { get; set; } - } -} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index bfe7ec1821..7e440dacf8 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -279,6 +279,7 @@ + @@ -289,7 +290,6 @@ -