mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09: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);
|
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
|
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
|
where T : RealmObject, IHasGuidPrimaryKey
|
||||||
{
|
{
|
||||||
return new RealmLive<T>(realmObject);
|
return new RealmLive<T>(realmObject);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user