29 references to InsertRange
Microsoft.CodeAnalysis (3)
Syntax\SeparatedSyntaxList.cs (3)
374return InsertRange(this.Count, nodes); 389return InsertRange(index, new[] { node }); 555return listWithFirstReplaced.InsertRange(index + 1, newNodeList);
Microsoft.CodeAnalysis.CSharp (2)
Syntax\SyntaxReplacer.cs (2)
407return list.InsertRange(index + 1, _newNodes.Cast<TNode>()); 410return list.InsertRange(index, _newNodes.Cast<TNode>());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
50return switchNode.WithArms(switchNode.Arms.InsertRange(insertLocation, newArms));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SeparatedSyntaxListExtensions.cs (1)
22var newList = separatedList.InsertRange(index, nodes);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
50return switchNode.WithArms(switchNode.Arms.InsertRange(insertLocation, newArms));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SeparatedSyntaxListTests.cs (4)
259newList = list.InsertRange(0, new[] { nodeD, nodeE }); 270Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(1, new[] { nodeD })); 271Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(-1, new[] { nodeD })); 275Assert.Throws<ArgumentNullException>(() => list.InsertRange(0, (IEnumerable<SyntaxNode>)null));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1149return WithAttributeArgumentList(declaration, existingArgumentList.WithArguments(existingArgumentList.Arguments.InsertRange(index, newArgumentList.Arguments))); 2163var newList = currentList.WithParameters(currentList.Parameters.InsertRange(index, newParameters.Parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SeparatedSyntaxListExtensions.cs (1)
22var newList = separatedList.InsertRange(index, nodes);
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\SyntaxReplacer.vb (2)
313Return list.InsertRange(index, Me._replacementNodes.Cast(Of TNode)) 315Return list.InsertRange(index + 1, Me._replacementNodes.Cast(Of TNode))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (11)
Syntax\SeparatedSyntaxListTests.vb (11)
65newList = list.InsertRange(0, {nodeD, nodeE}) 69newList = list.InsertRange(1, {nodeD, nodeE}) 73newList = list.InsertRange(2, {nodeD, nodeE}) 77newList = list.InsertRange(3, {nodeD, nodeE}) 140Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(-1, {nodeD})) 141Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(list.Count + 1, {nodeD})) 149Assert.Throws(Of ArgumentNullException)(Function() list.InsertRange(0, DirectCast(Nothing, IEnumerable(Of SyntaxNode)))) 177newList = list.InsertRange(0, {nodeD, nodeE}) 188Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(1, {nodeD})) 189Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(-1, {nodeD})) 195Assert.Throws(Of ArgumentNullException)(Function() list.InsertRange(0, DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3255list = list.WithArguments(list.Arguments.InsertRange(index, newArguments.Arguments))