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