mirror of https://github.com/ppy/osu
Allow detach to be run against an IQueryable directly
This commit is contained in:
parent
f0a9688baa
commit
46a1d99c74
|
@ -41,12 +41,12 @@ public static class RealmExtensions
|
|||
}).CreateMapper();
|
||||
|
||||
/// <summary>
|
||||
/// Create a detached copy of the each item in the list.
|
||||
/// Create a detached copy of the each item in the collection.
|
||||
/// </summary>
|
||||
/// <param name="items">A list of managed <see cref="RealmObject"/>s to detach.</param>
|
||||
/// <typeparam name="T">The type of object.</typeparam>
|
||||
/// <returns>A list containing non-managed copies of provided items.</returns>
|
||||
public static List<T> Detach<T>(this List<T> items) where T : RealmObject
|
||||
public static List<T> Detach<T>(this IEnumerable<T> items) where T : RealmObject
|
||||
{
|
||||
var list = new List<T>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue