コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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);
 }