32 overrides of GetCount
System.Linq (32)
System\Linq\AppendPrepend.SpeedOpt.cs (2)
122public override int GetCount(bool onlyIfCheap) 271public override int GetCount(bool onlyIfCheap)
System\Linq\Concat.SpeedOpt.cs (2)
13public override int GetCount(bool onlyIfCheap) 155public override int GetCount(bool onlyIfCheap)
System\Linq\DefaultIfEmpty.SpeedOpt.cs (1)
30public override int GetCount(bool onlyIfCheap)
System\Linq\Distinct.SpeedOpt.cs (1)
16public override int GetCount(bool onlyIfCheap) => onlyIfCheap ? -1 : new HashSet<TSource>(_source, _comparer).Count;
System\Linq\Grouping.SpeedOpt.cs (4)
18public override int GetCount(bool onlyIfCheap) => 30public override int GetCount(bool onlyIfCheap) => 42public override int GetCount(bool onlyIfCheap) => 54public override int GetCount(bool onlyIfCheap) =>
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
54public override int GetCount(bool onlyIfCheap) 547public override int GetCount(bool onlyIfCheap) => _source.GetCount(_minIndexInclusive, _maxIndexInclusive, onlyIfCheap);
System\Linq\Range.SpeedOpt.cs (1)
36public override int GetCount(bool onlyIfCheap) => _end - _start;
System\Linq\Repeat.SpeedOpt.cs (1)
32public override int GetCount(bool onlyIfCheap) => _count;
System\Linq\Reverse.SpeedOpt.cs (1)
26public override int GetCount(bool onlyIfCheap) =>
System\Linq\Select.SpeedOpt.cs (7)
50public override int GetCount(bool onlyIfCheap) 171public override int GetCount(bool onlyIfCheap) 297public override int GetCount(bool onlyIfCheap) 397public override int GetCount(bool onlyIfCheap) 500public override int GetCount(bool onlyIfCheap) 757public override int GetCount(bool onlyIfCheap) 928public override int GetCount(bool onlyIfCheap)
System\Linq\SelectMany.SpeedOpt.cs (1)
12public override int GetCount(bool onlyIfCheap)
System\Linq\SkipTake.SpeedOpt.cs (2)
118public override int GetCount(bool onlyIfCheap) => Count; 247public override int GetCount(bool onlyIfCheap)
System\Linq\Union.SpeedOpt.cs (1)
31public override int GetCount(bool onlyIfCheap) => onlyIfCheap ? -1 : FillSet().Count;
System\Linq\Where.SpeedOpt.cs (6)
13public override int GetCount(bool onlyIfCheap) 156public override int GetCount(bool onlyIfCheap) => GetCount(onlyIfCheap, _source, _predicate); 286public override int GetCount(bool onlyIfCheap) => ArrayWhereIterator<TSource>.GetCount(onlyIfCheap, CollectionsMarshal.AsSpan(_source), _predicate); 355public override int GetCount(bool onlyIfCheap) => GetCount(onlyIfCheap, _source, _predicate, _selector); 488public override int GetCount(bool onlyIfCheap) => ArrayWhereSelectIterator<TSource, TResult>.GetCount(onlyIfCheap, CollectionsMarshal.AsSpan(_source), _predicate, _selector); 503public override int GetCount(bool onlyIfCheap)
16 references to GetCount
System.Linq (16)
System\Linq\AnyAll.cs (1)
26int count = iterator.GetCount(onlyIfCheap: true);
System\Linq\AppendPrepend.SpeedOpt.cs (2)
126int count = iterator.GetCount(onlyIfCheap); 275int count = iterator.GetCount(onlyIfCheap);
System\Linq\Concat.SpeedOpt.cs (2)
184return checked(count + node._tail.GetCount(onlyIfCheap)); 351int count = GetCount(onlyIfCheap: true);
System\Linq\Count.cs (2)
26return iterator.GetCount(onlyIfCheap: false); 123int c = iterator.GetCount(onlyIfCheap: true);
System\Linq\DefaultIfEmpty.SpeedOpt.cs (1)
39count = _source is Iterator<TSource> iterator ? iterator.GetCount(onlyIfCheap: true) : -1;
System\Linq\OrderedEnumerable.SpeedOpt.cs (1)
58return iterator.GetCount(onlyIfCheap);
System\Linq\Select.SpeedOpt.cs (6)
667Debug.Assert(_source.GetCount(onlyIfCheap: true) == -1); 687Debug.Assert(count == _source.GetCount(onlyIfCheap: true)); 696int count = _source.GetCount(onlyIfCheap: true); 707Debug.Assert(_source.GetCount(onlyIfCheap: true) == -1); 726int count = _source.GetCount(onlyIfCheap: true); 775return _source.GetCount(onlyIfCheap);
System\Linq\SkipTake.SpeedOpt.cs (1)
432iterator.GetCount(onlyIfCheap: true) is int count &&