1 write to _source
System.Linq (1)
System\Linq\AppendPrepend.cs (1)
47_source = source;
29 references to _source
System.Linq (29)
System\Linq\AppendPrepend.cs (9)
53_enumerator = _source.GetEnumerator(); 101private protected override Iterator<TSource> Clone() => new AppendPrepend1Iterator<TSource>(_source, _item, _appending); 143return new AppendPrependN<TSource>(_source, null, new SingleLinkedNode<TSource>(_item).Add(item), prependCount: 0, appendCount: 2); 147return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item), new SingleLinkedNode<TSource>(item), prependCount: 1, appendCount: 1); 155return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(item), new SingleLinkedNode<TSource>(_item), prependCount: 1, appendCount: 1); 159return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item).Add(item), null, prependCount: 2, appendCount: 0); 191private protected override Iterator<TSource> Clone() => new AppendPrependN<TSource>(_source, _prepended, _appended, _prependCount, _appendCount); 237return new AppendPrependN<TSource>(_source, _prepended, appended, _prependCount, _appendCount + 1); 243return new AppendPrependN<TSource>(_source, prepended, _appended, _prependCount + 1, _appendCount);
System\Linq\AppendPrepend.SpeedOpt.cs (20)
18if (_source is ICollection<TSource> c) 41builder.AddNonICollectionRange(_source); 47builder.AddNonICollectionRange(_source); 77if (_source is ICollection<TSource> collection) 83foreach (TSource item in _source) 113list.AddRange(_source); 124if (_source is Iterator<TSource> iterator) 130return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + 1 : -1; 137TSource? first = _source.TryGetFirst(out found); 152TSource? last = _source.TryGetLast(out found); 174return _source.TryGetElementAt(index, out found); 187if (_source is ICollection<TSource> c) 208builder.AddNonICollectionRange(_source); 234if (_source is ICollection<TSource> sourceCollection) 240foreach (TSource item in _source) 264list.AddRange(_source); 273if (_source is Iterator<TSource> iterator) 279return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + _appendCount + _prependCount : -1;