6 writes to _elements
System.Collections.Immutable (6)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (6)
37
_elements
= new T[capacity];
73
_elements
= temp;
77
_elements
= ImmutableArray<T>.Empty.array!;
211
_elements
= ImmutableArray<T>.Empty.array!;
234
_elements
= ImmutableArray<T>.Empty.array!;
742
Array.Resize(ref
_elements
, newCapacity);
58 references to _elements
System.Collections.Immutable (58)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (58)
55
get { return
_elements
.Length; }
63
if (value !=
_elements
.Length)
70
Array.Copy(
_elements
, temp, _count);
109
Array.Clear(
_elements
, value, _count - value);
115
_elements
[i] = default(T)!;
147
return
_elements
[index];
157
_elements
[index] = value;
175
return ref this.
_elements
[index];
210
T[] temp =
_elements
;
227
T[] result =
_elements
;
260
Array.Copy(
_elements
, index,
_elements
, index + 1, this.Count - index);
264
_elements
[index] = item;
282
Array.Copy(
_elements
, index,
_elements
, index + count, _count - index);
285
if (!items.TryCopyTo(
_elements
, index))
289
_elements
[index++] = item;
314
Array.Copy(
_elements
, index,
_elements
, index + items.Length, _count - index);
317
Array.Copy(items.array!, 0,
_elements
, index, items.Length);
330
_elements
[_count] = item;
347
if (items.TryCopyTo(
_elements
, _count))
371
Array.Copy(items, 0,
_elements
, offset, items.Length);
386
Array.Copy(items, 0,
_elements
, offset, items.Length);
402
Array.Copy(items, 0,
_elements
, offset, length);
438
items.CopyTo(new Span<T>(
_elements
, offset, items.Length));
451
var elements = new Span<T>(
_elements
, offset, items.Length);
478
this.AddRange(items.
_elements
, items.Count);
489
this.AddRange(items.
_elements
, items.Count);
546
if (match(
_elements
[i]))
569
Array.Copy(
_elements
, index + 1,
_elements
, index, this.Count - index - 1);
596
Array.Clear(
_elements
, index, length); // Clear the elements so that the gc can reclaim the references.
599
Array.Copy(
_elements
, index + length,
_elements
, index, this.Count - index - length);
664
_elements
[index] = newValue;
691
Array.Copy(
_elements
, result, this.Count);
704
Array.Copy(
_elements
, 0, array, index, this.Count);
714
Array.Copy(
_elements
, 0, destination, 0, this.Count);
730
Array.Copy(
_elements
, sourceIndex, destination, destinationIndex, length);
739
if (
_elements
.Length < capacity)
741
int newCapacity = Math.Max(
_elements
.Length * 2, capacity);
805
return Array.IndexOf(
_elements
, item, startIndex, count);
811
if (equalityComparer.Equals(
_elements
[i], item))
902
return Array.LastIndexOf(
_elements
, item, startIndex, count);
908
if (equalityComparer.Equals(item,
_elements
[i]))
924
Array.Reverse<T>(
_elements
, 0, _count);
949
Array.Sort(
_elements
, 0, this.Count, Comparer<T>.Default);
970
_elements
.AsSpan(0, _count).Sort(comparison);
989
Array.Sort(
_elements
, 0, _count, comparer);
1008
Array.Sort(
_elements
, index, count, comparer);
1019
new ReadOnlySpan<T>(
_elements
, 0, this.Count).CopyTo(destination);
1065
T[] nodes =
_elements
;
1088
Array.Copy(
_elements
, copied + removed,
_elements
, copied, copyLength);
1094
Array.Copy(
_elements
, copied + removed,
_elements
, copied,
_elements
.Length - (copied + removed));