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