Implemented interface members:
3 writes to
Microsoft.CodeAnalysis (2)
SegmentedList`1.cs (1)
207this[index] = (T)value!;
Serialization\ObjectReader.cs (1)
347=> _values[index] = value;
Microsoft.CodeAnalysis.UnitTests (1)
Collections\List\SegmentedList.Generic.Tests.Misc.cs (1)
245list[index] = item;
113 references to
Microsoft.CodeAnalysis (6)
ImmutableSegmentedList`1.cs (3)
98public T this[int index] => _list[index]; 102get => _list[index]; 108get => _list[index];
ImmutableSegmentedList`1+ValueBuilder.cs (1)
49readonly get => ReadOnlyList[index];
SegmentedList`1.cs (1)
200get => this[index];
Serialization\ObjectReader.cs (1)
350=> _values[referenceId];
Microsoft.CodeAnalysis.UnitTests (107)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (3)
38Assert.Equal(listBeforeAdd[index], list[index]); 44Assert.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)
59Assert.True(list[i] == null ? expectedItems[i] == null : list[i].Equals(expectedItems[i]));
Collections\List\SegmentedList.Generic.Tests.Find.cs (27)
239expectedItem = beforeList[i]; 311list.Add(beforeList[i]); 316expectedItem = beforeList[i]; 324T? expected = 0 < count ? beforeList[count - 1] : default(T); 388list.Add(beforeList[i]); 393expectedItem = beforeList[i]; 456expectedItem = beforeList[i]; 490expectedItem = beforeList[count - 1]; 554expectedItem = beforeList[i]; 580expectedItem = beforeList[count - 1]; 593expectedItem = beforeList[count - 2]; 603expectedItem = beforeList[count - 1]; 613expectedItem = beforeList[count - 2]; 677expectedItem = beforeList[i]; 740expectedItem = beforeList[i]; 762expectedItem = beforeList[count - 1]; 772expectedItem = beforeList[count - 2]; 835list.Add(beforeList[i]); 840expectedItem = beforeList[i]; 869expectedItem = beforeList[count - 1]; 874expectedItem = beforeList[count - 2]; 879expectedItem = beforeList[count - 2]; 889expectedItem = beforeList[count - 1]; 899expectedItem = beforeList[count - 2]; 952expectedItem = beforeList[i]; 970list.Add(list[i]); 977expectedItem = 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 (17)
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]) 235T tempItem = list[index]; 237Assert.Equal(list[index], tempItem); //String.Format("Err_707811hapba Expected item: {0} at: {1} actual: {2}", tempItem, index, list[index]) 244T 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)
236set.Add(match[i]);