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