mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
updated lazylist to make it easy to work with.
This commit is contained in:
@@ -4,7 +4,26 @@ using Marr.Data;
|
|||||||
namespace NzbDrone.Core.Datastore
|
namespace NzbDrone.Core.Datastore
|
||||||
{
|
{
|
||||||
public class LazyList<T> : LazyLoaded<List<T>>
|
public class LazyList<T> : LazyLoaded<List<T>>
|
||||||
|
{
|
||||||
|
public LazyList()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LazyList(IEnumerable<T> items)
|
||||||
|
: base(new List<T>(items))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator LazyList<T>(List<T> val)
|
||||||
|
{
|
||||||
|
return new LazyList<T>(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator List<T>(LazyList<T> lazy)
|
||||||
|
{
|
||||||
|
return lazy.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user