1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:04:06 +08:00

Remove IPostsImports interface (and move to IModelImporter)

This commit is contained in:
Dean Herbert 2022-06-20 18:53:48 +09:00
parent e732c5a2d7
commit ba394f2831
2 changed files with 7 additions and 18 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using osu.Game.Overlays.Notifications; using osu.Game.Overlays.Notifications;
@ -11,7 +12,7 @@ namespace osu.Game.Database
/// A class which handles importing of associated models to the game store. /// A class which handles importing of associated models to the game store.
/// </summary> /// </summary>
/// <typeparam name="TModel">The model type.</typeparam> /// <typeparam name="TModel">The model type.</typeparam>
public interface IModelImporter<TModel> : IPostNotifications, IPostImports<TModel>, ICanAcceptFiles public interface IModelImporter<TModel> : IPostNotifications, ICanAcceptFiles
where TModel : class, IHasGuidPrimaryKey where TModel : class, IHasGuidPrimaryKey
{ {
/// <summary> /// <summary>
@ -26,5 +27,10 @@ namespace osu.Game.Database
/// A user displayable name for the model type associated with this manager. /// A user displayable name for the model type associated with this manager.
/// </summary> /// </summary>
string HumanisedModelName => $"{typeof(TModel).Name.Replace(@"Info", "").ToLower()}"; string HumanisedModelName => $"{typeof(TModel).Name.Replace(@"Info", "").ToLower()}";
/// <summary>
/// Fired when the user requests to view the resulting import.
/// </summary>
public Action<IEnumerable<Live<TModel>>>? PresentImport { set; }
} }
} }

View File

@ -1,17 +0,0 @@
// 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.Collections.Generic;
namespace osu.Game.Database
{
public interface IPostImports<TModel>
where TModel : class, IHasGuidPrimaryKey
{
/// <summary>
/// Fired when the user requests to view the resulting import.
/// </summary>
public Action<IEnumerable<Live<TModel>>>? PresentImport { set; }
}
}