mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 10:57:30 +08:00
20 lines
664 B
C#
20 lines
664 B
C#
|
// 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 Realms;
|
||
|
|
||
|
namespace osu.Game.Database
|
||
|
{
|
||
|
public interface IRealmFactory
|
||
|
{
|
||
|
public Realm Get() => Realm.GetInstance();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Request a context for write usage. Can be consumed in a nested fashion (and will return the same underlying context).
|
||
|
/// This method may block if a write is already active on a different thread.
|
||
|
/// </summary>
|
||
|
/// <returns>A usage containing a usable context.</returns>
|
||
|
RealmWriteUsage GetForWrite();
|
||
|
}
|
||
|
}
|