1 write to _source
System.Linq (1)
System\Linq\AppendPrepend.cs (1)
47_source = source;
31 references to _source
System.Linq (31)
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 (22)
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); 182_source.Contains(value); 191if (_source is ICollection<TSource> c) 212builder.AddNonICollectionRange(_source); 238if (_source is ICollection<TSource> sourceCollection) 244foreach (TSource item in _source) 268list.AddRange(_source); 277if (_source is Iterator<TSource> iterator) 283return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + _appendCount + _prependCount : -1; 299return _source.Contains(value);