Implemented interface members:
2 writes to
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
236this[index] = (T)value!;
Microsoft.CodeAnalysis.UnitTests (1)
Collections\List\SegmentedList.Generic.Tests.Misc.cs (1)
263list[index] = item;
119 references to
Microsoft.CodeAnalysis (10)
PEWriter\FullMetadataWriter.cs (1)
452get { return _rows[rowId - 1]; }
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
100public T this[int index] => _list[index]; 104get => _list[index]; 110get => _list[index];
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
51readonly get => ReadOnlyList[index];
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
229get => this[index];
Text\SourceText.cs (4)
985int start = _lineStarts[index]; 992int end = _lineStarts[index + 1]; 1010if (position >= _lineStarts[lastLineNumber]) 1015if (position < _lineStarts[i])
Microsoft.CodeAnalysis.UnitTests (109)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (3)
41Assert.Equal(listBeforeAdd[index], list[index]); 47Assert.Equal(enumerable.ElementAt(index), list[index + listLength]);
Collections\List\SegmentedList.Generic.Tests.BinarySearch.cs (8)
36Assert.Equal(index, list.BinarySearch(beforeList[index])); 37Assert.Equal(index, list.BinarySearch(beforeList[index], GetIComparer())); 38Assert.Equal(beforeList[index], list[index]); 55Assert.True(list.BinarySearch(beforeList[index]) >= 0); 56Assert.True(list.BinarySearch(beforeList[index], GetIComparer()) >= 0); 57Assert.Equal(beforeList[index], list[index]);
Collections\List\SegmentedList.Generic.Tests.Constructor.cs (2)
69Assert.Equal(expected[i], list[i]); //"Expected object in item array to be the same as in the list"
Collections\List\SegmentedList.Generic.Tests.ConvertAll.cs (4)
31Assert.Equal(before[i], list[i]); 32Assert.Equal(before[i] * 10, after[i]);
Collections\List\SegmentedList.Generic.Tests.cs (4)
62Assert.True(list[i] == null ? expectedItems[i] == null : list[i].Equals(expectedItems[i]));
Collections\List\SegmentedList.Generic.Tests.Find.cs (27)
239expectedItem = beforeList[i]; 332list.Add(beforeList[i]); 337expectedItem = beforeList[i]; 345T? expected = 0 < count ? beforeList[count - 1] : default(T); 409list.Add(beforeList[i]); 414expectedItem = beforeList[i]; 477expectedItem = beforeList[i]; 511expectedItem = beforeList[count - 1]; 575expectedItem = beforeList[i]; 601expectedItem = beforeList[count - 1]; 614expectedItem = beforeList[count - 2]; 624expectedItem = beforeList[count - 1]; 634expectedItem = beforeList[count - 2]; 698expectedItem = beforeList[i]; 761expectedItem = beforeList[i]; 783expectedItem = beforeList[count - 1]; 793expectedItem = beforeList[count - 2]; 856list.Add(beforeList[i]); 861expectedItem = beforeList[i]; 890expectedItem = beforeList[count - 1]; 895expectedItem = beforeList[count - 2]; 900expectedItem = beforeList[count - 2]; 910expectedItem = beforeList[count - 1]; 920expectedItem = beforeList[count - 2]; 973expectedItem = beforeList[i]; 991list.Add(list[i]); 998expectedItem = beforeList[i];
Collections\List\SegmentedList.Generic.Tests.IndexOf.cs (7)
97Assert.Equal(i, IndexOf(list, expectedList[i])); 142Assert.Equal(i, IndexOf(list, withoutDuplicates[i])); 144Assert.Equal(count + i, IndexOf(list, withoutDuplicates[i])); 163Assert.Equal(expectedIndex, list.IndexOf(withoutDuplicates[i], (count * j))); 164Assert.Equal(expectedIndex, list.IndexOf(withoutDuplicates[i], (count * j), count)); 184Assert.Equal(expectedIndex, list.LastIndexOf(withoutDuplicates[i], (count * (j + 1)) - 1)); 185Assert.Equal(expectedIndex, list.LastIndexOf(withoutDuplicates[i], (count * (j + 1)) - 1, count));
Collections\List\SegmentedList.Generic.Tests.Misc.cs (19)
55Assert.Equal(list[i], items[i]); //"Expect to be the same." 60Assert.Equal(list[i], item); //"Expect to be the same." 65Assert.Equal(list[i], items[i - repeat]); //"Expect to be the same." 94Assert.Equal(list[i], items[i]); //"Expected them to be equal." 99Assert.Equal((object?)list[i], item); //"Expected them to be equal." 104Assert.Equal(list[i], items[i - repeat]); //"Expected them to be equal." 142Assert.Equal(list[i], itemsX[i]); //"Should have the same result." 147Assert.Equal(list[i], itemsY[(i - index) % itemsY.Length]); //"Should have the same result." 152Assert.Equal(list[i], itemsX[i - (itemsY.Length * repeat)]); //"Should have the same result." 167Assert.Equal(list[i], itemsX[i]); //"Should have the same result." 172Assert.Equal(list[i], itemsX[(i - index) % itemsX.Length]); //"Should have the same result." 177Assert.Equal(list[i], itemsX[i - (itemsX.Length)]); //"Should have the same result." 221Assert.Equal(range[i], items[i + index]); //String.Format("Err_170178aqhbpa Expected item: {0} at: {1} actual: {2}", items[i + index], i, range[i]) 227Assert.Equal(list[i], items[i]); //String.Format("Err_00125698ahpap Expected item: {0} at: {1} actual: {2}", items[i], i, list[i]) 239Assert.Equal(range[i], items[i + index]); //String.Format("Err_170178aqhbpa Expected item: {0} at: {1} actual: {2}", items[i + index], i, range[i]) 245Assert.Equal(list[i], items[i]); //String.Format("Err_00125698ahpap Expected item: {0} at: {1} actual: {2}", items[i], i, list[i]) 253T tempItem = list[index]; 255Assert.Equal(list[index], tempItem); //String.Format("Err_707811hapba Expected item: {0} at: {1} actual: {2}", tempItem, index, list[index]) 262T tempItem = list[index];
Collections\List\SegmentedList.Generic.Tests.Remove.cs (4)
89Assert.Equal(list[i], beforeList[i]); //"Expected them to be the same." 94Assert.Equal(list[i], beforeList[i + count]); //"Expected them to be the same."
Collections\List\SegmentedList.Generic.Tests.Reverse.cs (14)
35Assert.Equal(list[i], listBefore[listBefore.Count - (i + 1)]); //"Expect them to be the same." 58Assert.Equal(list[i], listBefore[i]); //"Expect them to be the same." 64Assert.Equal(list[i], listBefore[index + count - (j + 1)]); //"Expect them to be the same." 70Assert.Equal(list[i], listBefore[i]); //"Expect them to be the same." 95Assert.Equal(list[i], listBefore[i]); //"Expect them to be the same." 101Assert.Equal(list[i], listBefore[index + count - (j + 1)]); //"Expect them to be the same." 107Assert.Equal(list[i], listBefore[i]); //"Expect them to be the same."
Collections\List\SegmentedList.Generic.Tests.Sort.cs (16)
41Assert.True(comparer.Compare(list[i], list[i + 1]) < 0); 55Assert.True(comparer.Compare(list[i], list[i + 1]) <= 0); 72Assert.True(comparer.Compare(list[i], list[i + 1]) < 0); 86Assert.True(comparer.Compare(list[i], list[i + 1]) <= 0); 104Assert.True(iComparer.Compare(list[i], list[i + 1]) < 0); 119Assert.True(iComparer.Compare(list[i], list[i + 1]) <= 0); 139Assert.InRange(comparer.Compare(list[i], list[i + 1]), int.MinValue, 0); 156Assert.InRange(comparer.Compare(list[i], list[i + 1]), int.MinValue, 1);
Collections\List\TestBase.Generic.cs (1)
243set.Add(match[i]);