10 instantiations of SingleLinkedNode
System.Linq (10)
System\Linq\AppendPrepend.cs (8)
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); 236var appended = _appended is not null ? _appended.Add(item) : new SingleLinkedNode<TSource>(item); 242var prepended = _prepended is not null ? _prepended.Add(item) : new SingleLinkedNode<TSource>(item);
System\Linq\SingleLinkedNode.cs (1)
49public SingleLinkedNode<TSource> Add(TSource item) => new SingleLinkedNode<TSource>(this, item);
System\Linq\Union.cs (1)
241var sources = new SingleLinkedNode<IEnumerable<TSource>>(_first).Add(_second).Add(next);
21 references to SingleLinkedNode
System.Linq (21)
System\Linq\AppendPrepend.cs (7)
170private readonly SingleLinkedNode<TSource>? _prepended; 171private readonly SingleLinkedNode<TSource>? _appended; 174private SingleLinkedNode<TSource>? _node; 176public AppendPrependN(IEnumerable<TSource> source, SingleLinkedNode<TSource>? prepended, SingleLinkedNode<TSource>? appended, int prependCount, int appendCount) 236var appended = _appended is not null ? _appended.Add(item) : new SingleLinkedNode<TSource>(item); 242var prepended = _prepended is not null ? _prepended.Add(item) : new SingleLinkedNode<TSource>(item);
System\Linq\AppendPrepend.SpeedOpt.cs (3)
204for (SingleLinkedNode<TSource>? node = _prepended; node is not null; node = node.Linked) 228for (SingleLinkedNode<TSource>? node = _prepended; node is not null; node = node.Linked) 248for (SingleLinkedNode<TSource>? node = _appended; node is not null; node = node.Linked)
System\Linq\SingleLinkedNode.cs (8)
28private SingleLinkedNode(SingleLinkedNode<TSource> linked, TSource item) 43public SingleLinkedNode<TSource>? Linked { get; } 49public SingleLinkedNode<TSource> Add(TSource item) => new SingleLinkedNode<TSource>(this, item); 57for (SingleLinkedNode<TSource>? node = this; node is not null; node = node.Linked) 72public SingleLinkedNode<TSource> GetNode(int index) 76SingleLinkedNode<TSource> node = this; 106for (SingleLinkedNode<TSource>? node = this; node is not null; node = node.Linked) 120for (SingleLinkedNode<TSource>? node = this; node is not null; node = node.Linked)
System\Linq\Union.cs (3)
241var sources = new SingleLinkedNode<IEnumerable<TSource>>(_first).Add(_second).Add(next); 252private readonly SingleLinkedNode<IEnumerable<TSource>> _sources; 255public UnionIteratorN(SingleLinkedNode<IEnumerable<TSource>> sources, int headIndex, IEqualityComparer<TSource>? comparer)