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)
108private protected override Iterator<TSource> Clone() => new ShuffleTakeIterator<TSource>(_source, _takeCount); 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 _) ?? []; 154TryGetNonEnumeratedCount(_source, out int count) ? Math.Min(_takeCount, count) : 155!onlyIfCheap ? _source.Take(_takeCount).Count() : 170if ((uint)index < (uint)Math.Min(_takeCount, iteratorCount)) 178if ((uint)index < (uint)Math.Min(_takeCount, count)) 187if (sample is not null && index < Math.Min(_takeCount, totalElementCount)) 199_takeCount <= count ? this : new ShuffleTakeIterator<TSource>(_source, count); 294if (list.Count <= _takeCount) 319if (iteratorCount <= _takeCount) 355Debug.Assert(_takeCount > 0, $"Expected positive {nameof(_takeCount)}."); 360if (totalCount <= _takeCount) 371for (long i = 0; i < _takeCount; i++)