1 write to _source
System.Linq (1)
System\Linq\DefaultIfEmpty.cs (1)
38_source = source;
11 references to _source
System.Linq (11)
System\Linq\DefaultIfEmpty.cs (2)
42private protected override Iterator<TSource> Clone() => new DefaultIfEmptyIterator<TSource>(_source, _default); 49_enumerator = _source.GetEnumerator();
System\Linq\DefaultIfEmpty.SpeedOpt.cs (9)
15TSource[] array = _source.ToArray(); 21List<TSource> list = _source.ToList(); 33if (!onlyIfCheap || _source is ICollection<TSource> || _source is ICollection) 35count = _source.Count(); 39count = _source is Iterator<TSource> iterator ? iterator.GetCount(onlyIfCheap: true) : -1; 47TSource? first = _source.TryGetFirst(out found); 59TSource? last = _source.TryGetLast(out found); 71TSource? item = _source.TryGetElementAt(index, out found);