14 references to Insert
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
613=> Insert(index, element);
Microsoft.CodeAnalysis.UnitTests (13)
Collections\ImmutableSegmentedListTest.cs (13)
71actual = actual.Insert(position, value); 246Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Insert(1, 5)); 247Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Insert(-1, 5)); 249list = list.Insert(0, 10); 250list = list.Insert(1, 20); 251list = list.Insert(2, 30); 253list = list.Insert(2, 25); 254list = list.Insert(1, 15); 255list = list.Insert(0, 5); 262Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Insert(7, 5)); 263Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Insert(-1, 5)); 271list = list.Insert(0, 2); 272list = list.Insert(1, 3);