mirror of https://github.com/ppy/osu
Return `ILive` from `ToLive` calls instead of realm-typed instance
This commit is contained in:
parent
bb6f8bd59c
commit
21e8ab8357
|
@ -49,13 +49,13 @@ public static T Detach<T>(this T item) where T : RealmObject
|
|||
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