mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Return ILive
from ToLive
calls instead of realm-typed instance
This commit is contained in:
parent
bb6f8bd59c
commit
21e8ab8357
@ -49,13 +49,13 @@ namespace osu.Game.Database
|
||||
return mapper.Map<T>(item);
|
||||
}
|
||||
|
||||
public static List<RealmLive<T>> ToLive<T>(this IEnumerable<T> realmList)
|
||||
public static List<ILive<T>> ToLive<T>(this IEnumerable<T> realmList)
|
||||
where T : RealmObject, IHasGuidPrimaryKey
|
||||
{
|
||||
return realmList.Select(l => new RealmLive<T>(l)).ToList();
|
||||
return realmList.Select(l => new RealmLive<T>(l)).Cast<ILive<T>>().ToList();
|
||||
}
|
||||
|
||||
public static RealmLive<T> ToLive<T>(this T realmObject)
|
||||
public static ILive<T> ToLive<T>(this T realmObject)
|
||||
where T : RealmObject, IHasGuidPrimaryKey
|
||||
{
|
||||
return new RealmLive<T>(realmObject);
|
||||
|
Loading…
Reference in New Issue
Block a user