2013-03-26 05:51:56 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Marr.Data;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
|
|
|
{
|
|
|
|
|
public class LazyList<T> : LazyLoaded<List<T>>
|
|
|
|
|
{
|
2013-03-27 02:12:40 +00:00
|
|
|
|
public LazyList()
|
2013-03-30 21:29:29 +00:00
|
|
|
|
: this(new List<T>())
|
2013-03-27 02:12:40 +00:00
|
|
|
|
{
|
2013-03-26 05:51:56 +00:00
|
|
|
|
|
2013-03-27 02:12:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
2013-03-26 05:51:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|