10 writes to _items
Microsoft.CodeAnalysis.CodeStyle (10)
src\Dependencies\Collections\SegmentedList`1.cs (10)
51_items = s_emptyArray; 64_items = s_emptyArray; 66_items = new SegmentedArray<T>(capacity); 80_items = (SegmentedArray<T>)segmentedList._items.Clone(); 90_items = s_emptyArray; 95_items = new SegmentedArray<T>(count); 108_items = s_emptyArray; 139_items = s_emptyArray; 146_items = new SegmentedArray<T>(value); 151_items = CreateNewSegmentedArrayReusingOldSegments(_items, value);
84 references to _items
Microsoft.CodeAnalysis.CodeStyle (84)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
135return ref self._list._items[index];
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
67return ref ReadOnlyList._items[index];
src\Dependencies\Collections\SegmentedList`1.cs (82)
80_items = (SegmentedArray<T>)segmentedList._items.Clone(); 96if (SegmentedCollectionsMarshal.AsSegments(_items) is { Length: 1 } segments) 126get => _items.Length; 134if (value == _items.Length) 143if (_items.Length == 0) 151_items = CreateNewSegmentedArrayReusingOldSegments(_items, value); 204return _items[index]; 213_items[index] = value; 251var array = _items; 268Debug.Assert(_size == _items.Length); 272_items[size] = item; 307if (_items.Length - _size < count) 314SegmentedArray.Copy(list._items, 0, _items, _size, list.Count); 318SegmentedArray.Copy(array, 0, _items, _size, array.Length); 324_items[targetIndex++] = item; 373return SegmentedArray.BinarySearch(_items, index, count, item, comparer); 399SegmentedArray.Clear(_items, 0, size); // Clear the elements so that the gc can reclaim the references. 439list._items[i] = converter(_items[i]); 462SegmentedArray.Copy(_items, 0, array!, arrayIndex, _size); 482SegmentedArray.Copy(_items, index, array, arrayIndex, count); 488SegmentedArray.Copy(_items, 0, array, arrayIndex, _size); 504if (_items.Length < capacity) 509return _items.Length; 518Debug.Assert(_items.Length < capacity); 522if (_items.Length < SegmentedArrayHelper.GetSegmentSize<T>() / 2) 526newCapacity = _items.Length == 0 ? DefaultCapacity : _items.Length * 2; 528else if (_items.Length < SegmentedArrayHelper.GetSegmentSize<T>()) 536if (0 == (_items.Length & SegmentedArrayHelper.GetOffsetMask<T>())) 543var oldSegmentCount = (_items.Length + SegmentedArrayHelper.GetSegmentSize<T>() - 1) >> SegmentedArrayHelper.GetSegmentShift<T>(); 583if (match(_items[i])) 585return _items[i]; 601if (match(_items[i])) 603list.Add(_items[i]); 635if (match(_items[i])) 650if (match(_items[i])) 652return _items[i]; 697if (match(_items[i])) 720action(_items[i]); 763SegmentedArray.Copy(_items, index, list._items, 0, count); 791=> SegmentedArray.IndexOf(_items, item, 0, _size); 815return SegmentedArray.IndexOf(_items, item, index, _size - index); 835return SegmentedArray.IndexOf(_items, item, index, count); 846return SegmentedArray.IndexOf(_items, item, index, count, comparer); 860if (_size == _items.Length) 864SegmentedArray.Copy(_items, index, _items, index + 1, _size - index); 866_items[index] = item; 907if (_items.Length - _size < count) 913SegmentedArray.Copy(_items, index, _items, index + count, _size - index); 920SegmentedArray.Copy(_items, 0, _items, index, index); 922SegmentedArray.Copy(_items, index + count, _items, index * 2, _size - index); 926SegmentedArray.Copy(list._items, 0, _items, index, list.Count); 930SegmentedArray.Copy(array, 0, _items, index, array.Length); 936_items[targetIndex++] = item; 1026return SegmentedArray.LastIndexOf(_items, item, index, count); 1057return SegmentedArray.LastIndexOf(_items, item, index, count, comparer); 1094while (freeIndex < _size && !match(_items[freeIndex])) 1103while (current < _size && match(_items[current])) 1109_items[freeIndex++] = _items[current++]; 1117SegmentedArray.Clear(_items, freeIndex, _size - freeIndex); // Clear the elements so that the gc can reclaim the references. 1137SegmentedArray.Copy(_items, index + 1, _items, index, _size - index); 1143_items[_size] = default!; 1169SegmentedArray.Copy(_items, index + count, _items, index, _size - index); 1177SegmentedArray.Clear(_items, _size, count); 1208SegmentedArray.Reverse(_items, index, count); 1248SegmentedArray.Sort(_items, index, count, comparer); 1262var segment = new SegmentedArraySegment<T>(_items, 0, _size); 1278SegmentedArray.Copy(_items, array, _size); 1293var threshold = (int)(_items.Length * 0.9); 1309if (!match(_items[i])) 1342_current = localList._items[_index];