1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 03:47:26 +08:00
osu-lazer/osu.Game/Database/IModelManager.cs

29 lines
1.1 KiB
C#
Raw Normal View History

// 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;
2020-05-19 15:44:22 +08:00
using osu.Framework.Bindables;
namespace osu.Game.Database
{
/// <summary>
2019-11-17 20:48:23 +08:00
/// Represents a model manager that publishes events when <typeparamref name="TModel"/>s are added or removed.
/// </summary>
/// <typeparam name="TModel">The model type.</typeparam>
2020-05-19 15:44:22 +08:00
public interface IModelManager<TModel>
where TModel : class
{
/// <summary>
/// A bindable which contains a weak reference to the last item that was updated.
/// This is not thread-safe and should be scheduled locally if consumed from a drawable component.
/// </summary>
IBindable<WeakReference<TModel>> ItemUpdated { get; }
/// <summary>
/// A bindable which contains a weak reference to the last item that was removed.
/// This is not thread-safe and should be scheduled locally if consumed from a drawable component.
/// </summary>
2020-05-19 15:44:22 +08:00
IBindable<WeakReference<TModel>> ItemRemoved { get; }
}
}