1 write to _takeCount
System.Linq (1)
System\Linq\Shuffle.SpeedOpt.cs (1)
105
_takeCount
= takeCount;
16 references to _takeCount
System.Linq (16)
System\Linq\Shuffle.SpeedOpt.cs (16)
108
private protected override Iterator<TSource> Clone() => new ShuffleTakeIterator<TSource>(_source,
_takeCount
);
130
List<TSource>? buffer = SampleToList(_source,
_takeCount
, out _);
149
public override TSource[] ToArray() => SampleToList(_source,
_takeCount
, out _)?.ToArray() ?? [];
151
public override List<TSource> ToList() => SampleToList(_source,
_takeCount
, out _) ?? [];
154
TryGetNonEnumeratedCount(_source, out int count) ? Math.Min(
_takeCount
, count) :
155
!onlyIfCheap ? _source.Take(
_takeCount
).Count() :
170
if ((uint)index < (uint)Math.Min(
_takeCount
, iteratorCount))
178
if ((uint)index < (uint)Math.Min(
_takeCount
, count))
187
if (sample is not null && index < Math.Min(
_takeCount
, totalElementCount))
199
_takeCount
<= count ? this : new ShuffleTakeIterator<TSource>(_source, count);
294
if (list.Count <=
_takeCount
)
319
if (iteratorCount <=
_takeCount
)
355
Debug.Assert(
_takeCount
> 0, $"Expected positive {nameof(
_takeCount
)}.");
360
if (totalCount <=
_takeCount
)
371
for (long i = 0; i <
_takeCount
; i++)