2021-01-07 13:07:36 +08:00
|
|
|
|
// 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.Framework.Platform;
|
|
|
|
|
|
2021-01-12 13:55:45 +08:00
|
|
|
|
#nullable enable
|
|
|
|
|
|
2021-01-07 13:07:36 +08:00
|
|
|
|
namespace osu.Game.Database
|
|
|
|
|
{
|
|
|
|
|
public abstract class RealmBackedStore
|
|
|
|
|
{
|
2021-01-12 13:55:45 +08:00
|
|
|
|
protected readonly Storage? Storage;
|
2021-01-07 13:07:36 +08:00
|
|
|
|
|
|
|
|
|
protected readonly IRealmFactory ContextFactory;
|
|
|
|
|
|
2021-01-12 13:55:45 +08:00
|
|
|
|
protected RealmBackedStore(IRealmFactory contextFactory, Storage? storage = null)
|
2021-01-07 13:07:36 +08:00
|
|
|
|
{
|
|
|
|
|
ContextFactory = contextFactory;
|
|
|
|
|
Storage = storage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Perform any common clean-up tasks. Should be run when idle, or whenever necessary.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual void Cleanup()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|