public void FastLinq_Paginate_ToList() { List <string> _ = FastLinq.ToList( FastLinq.Take( FastLinq.Skip(this.stringList, 30), 10)); }
public void FastLinq_LastTen_Lazy() { IReadOnlyList <int> _ = FastLinq.Reverse( FastLinq.Take( FastLinq.Reverse(this.intArray), 10)); }
public void TakeNone() { IReadOnlyList <int> list = new[] { 1, 2, 3 }; ListCompareTestUtil.ValidateEqual( Enumerable.Take(list, 0), FastLinq.Take(list, 0), itemNotInTheCollection: 0, enforceWritable: false); }
public void NominalCaseOther() { IReadOnlyList <int> list = new ArraySegment <int>(new int[] { 1, 2, 3 }); ListCompareTestUtil.ValidateEqual( Enumerable.Take(list, 1), FastLinq.Take(list, 1), itemNotInTheCollection: 0, enforceWritable: false); }
public void TakeNoneObjects() { IReadOnlyList <object> list = new object[] { "a", "b" }; ListCompareTestUtil.ValidateEqual( Enumerable.Take(list, 0), FastLinq.Take(list, 0), itemNotInTheCollection: null, enforceWritable: false); }
public void TakeNegative() { IReadOnlyCollection <int> collection = new[] { 1, 2, 3 }; CollectionCompareTestUtil.ValidateEqual( Enumerable.Take(collection, -1), FastLinq.Take(collection, -1), itemNotInTheCollection: 0, enforceWritable: false); }
public void Array_FastLinq() { var result = FastLinq.Take(this.array, this.TakeCount); if (this.EnumerateAfterwards) { foreach (var item in result) { ; } } }
public void Collection_FastLinq() { var result = FastLinq.Take(this.collection, this.TakeCount); if (this.EnumerateAfterwards) { foreach (var item in result) { ; } } }
public void FastLinq_Paginate_AndEnumerate() { var _ = FastLinq.Take( FastLinq.Skip(this.stringList, 30), 10); int i = 0; foreach (var item in _) { i++; } }
public void FastLinq_LastTen_AndEnumerate() { IReadOnlyList <int> _ = FastLinq.Reverse( FastLinq.Take( FastLinq.Reverse(this.intArray), 10)); int i = 0; foreach (var item in _) { i++; } }
public void Setup() { switch (this.ItemType) { case UnderlyingItemType.Array: this.underlying = Enumerable.Range(0, this.SizeOfInput).ToArray(); break; case UnderlyingItemType.List: this.underlying = Enumerable.Range(0, this.SizeOfInput).ToList(); break; default: throw new ArgumentOutOfRangeException(); } this.TakeList = FastLinq.Take( this.underlying, this.TakeCount); }
public void FastLinq_Paginate_Lazy() { var _ = FastLinq.Take( FastLinq.Skip(this.stringList, 30), 10); }