mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rename interface
- Fix wrong inheritance in ArchiveModelManager - Add license headers
This commit is contained in:
@ -18,7 +18,7 @@ namespace osu.Game.Database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TModel">The model type.</typeparam>
|
/// <typeparam name="TModel">The model type.</typeparam>
|
||||||
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
||||||
public abstract class ArchiveDownloadModelManager<TModel, TFileModel> : ArchiveModelManager<TModel, TFileModel>, IDownloadModelManager<TModel>
|
public abstract class ArchiveDownloadModelManager<TModel, TFileModel> : ArchiveModelManager<TModel, TFileModel>, IModelDownloader<TModel>
|
||||||
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
||||||
where TFileModel : INamedFileInfo, new()
|
where TFileModel : INamedFileInfo, new()
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TModel">The model type.</typeparam>
|
/// <typeparam name="TModel">The model type.</typeparam>
|
||||||
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
||||||
public abstract class ArchiveModelManager<TModel, TFileModel> : ICanAcceptFiles, IModelManager
|
public abstract class ArchiveModelManager<TModel, TFileModel> : ICanAcceptFiles, IModelManager<TModel>
|
||||||
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
||||||
where TFileModel : INamedFileInfo, new()
|
where TFileModel : INamedFileInfo, new()
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ namespace osu.Game.Database
|
|||||||
/// Fired when a new <see cref="TModel"/> becomes available in the database.
|
/// Fired when a new <see cref="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 event ItemAddedDelegate ItemAdded;
|
public event Action<TModel, bool> ItemAdded;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fired when a <see cref="TModel"/> is removed from the database.
|
/// Fired when a <see cref="TModel"/> is removed from the database.
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
using osu.Game.Online.API;
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Online.API;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public interface IDownloadModelManager<TModel> : IModelManager<TModel>
|
public interface IModelDownloader<TModel> : IModelManager<TModel>
|
||||||
where TModel : class
|
where TModel : class
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
@ -1,20 +1,14 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public interface IModelManager<TModel>
|
public interface IModelManager<TModel>
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Fired when a new <see cref="TModel"/> becomes available in the database.
|
|
||||||
/// This is not guaranteed to run on the update thread.
|
|
||||||
/// </summary>
|
|
||||||
event Action<TModel, bool> ItemAdded;
|
event Action<TModel, bool> ItemAdded;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fired when a <see cref="TModel"/> is removed from the database.
|
|
||||||
/// This is not guaranteed to run on the update thread.
|
|
||||||
/// </summary>
|
|
||||||
event Action<TModel> ItemRemoved;
|
event Action<TModel> ItemRemoved;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user