mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Cleanups and xmldoc additions
This commit is contained in:
parent
8c1d581fb3
commit
1b13be1372
@ -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
|
||||
{
|
||||
|
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.
|
||||
|
@ -1,9 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.IO
|
||||
{
|
||||
public interface IHasFiles<TFile>
|
||||
{
|
||||
List<TFile> Files { get; set; }
|
||||
}
|
||||
}
|
@ -279,6 +279,7 @@
|
||||
<Compile Include="Database\DatabaseWriteUsage.cs" />
|
||||
<Compile Include="Database\ICanAcceptFiles.cs" />
|
||||
<Compile Include="Database\IDatabaseContextFactory.cs" />
|
||||
<Compile Include="Database\IHasFiles.cs" />
|
||||
<Compile Include="Database\IHasPrimaryKey.cs" />
|
||||
<Compile Include="Database\INamedFileInfo.cs" />
|
||||
<Compile Include="Database\ISoftDelete.cs" />
|
||||
@ -289,7 +290,6 @@
|
||||
<Compile Include="IO\Archives\ArchiveReader.cs" />
|
||||
<Compile Include="IO\Archives\LegacyFilesystemReader.cs" />
|
||||
<Compile Include="IO\Archives\ZipArchiveReader.cs" />
|
||||
<Compile Include="IO\IHasFiles.cs" />
|
||||
<Compile Include="Online\API\APIDownloadRequest.cs" />
|
||||
<Compile Include="Online\API\Requests\GetUserRequest.cs" />
|
||||
<Compile Include="Migrations\20180125143340_Settings.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user