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