/// <summary> Creates a lazy list that caches the results of the specified function. </summary> /// <param name="generator"> The function generating the elements to cache. The specified argument is the index. </param> public LazyReadOnlyList([NotNull] Func <int, T> generator) { this.data = new LazyList <T>(generator); }
/// <summary> Creates a new lazy readonly enumerable from the specified enumerable. </summary> /// <param name="enumerable"> The enumerable to wrap around. </param> public LazyReadOnlyList([NotNull] IEnumerable <T> enumerable) { this.data = new LazyList <T>(enumerable); }