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