System\Linq\Shuffle.SpeedOpt.cs (5)
61List<TSource>? sample = ShuffleTakeIterator<TSource>.SampleToList(_source, 1, out long totalElementCount);
130List<TSource>? buffer = SampleToList(_source, _takeCount, out _);
149public override TSource[] ToArray() => SampleToList(_source, _takeCount, out _)?.ToArray() ?? [];
151public override List<TSource> ToList() => SampleToList(_source, _takeCount, out _) ?? [];
186List<TSource>? sample = SampleToList(_source, 1, out long totalElementCount);