29 references to InsertRange
Microsoft.CodeAnalysis (2)
Syntax\SyntaxList`1.cs (2)
231return this.InsertRange(this.Count, nodes); 246return InsertRange(index, new[] { node });
Microsoft.CodeAnalysis.CSharp (2)
Syntax\SyntaxReplacer.cs (2)
431return list.InsertRange(index + 1, _newNodes.Cast<TNode>()); 434return list.InsertRange(index, _newNodes.Cast<TNode>());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
511return Cast<TDeclarationNode>(compilationUnit.WithMembers(compilationUnit.Members.InsertRange(insertionIndex, wrappedStatements))); 554newBlock = newBlock.WithStatements(newBlock.Statements.InsertRange(index, newStatements));
Microsoft.CodeAnalysis.CSharp.Features (1)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
121return currentRoot.WithMembers(currentRoot.Members.InsertRange(0, globalStatements));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxListTests.cs (4)
211newList = list.InsertRange(0, new[] { nodeD, nodeE }); 222Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(1, new[] { nodeD })); 223Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(-1, new[] { nodeD })); 229Assert.Throws<ArgumentNullException>(() => list.InsertRange(0, (IEnumerable<SyntaxNode>)null));
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
1250CompilationUnitSyntax cu => cu.WithUsings(cu.Usings.InsertRange(index, usingsToInsert)), 1251BaseNamespaceDeclarationSyntax nd => nd.WithUsings(nd.Usings.InsertRange(index, usingsToInsert)), 2180var newSections = statement.Sections.InsertRange(index, switchSections.Cast<SwitchSectionSyntax>()); 2559var newList = currentList.WithAccessors(currentList.Accessors.InsertRange(index, newAccessors.Accessors));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
511return Cast<TDeclarationNode>(compilationUnit.WithMembers(compilationUnit.Members.InsertRange(insertionIndex, wrappedStatements))); 554newBlock = newBlock.WithStatements(newBlock.Statements.InsertRange(index, newStatements));
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\SyntaxReplacer.vb (2)
330Return list.InsertRange(index, Me._replacementNodes.Cast(Of TNode)) 332Return list.InsertRange(index + 1, Me._replacementNodes.Cast(Of TNode))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (9)
Syntax\SyntaxListTests.vb (9)
59newList = list.InsertRange(0, {nodeD, nodeE}) 63newList = list.InsertRange(1, {nodeD, nodeE}) 67newList = list.InsertRange(2, {nodeD, nodeE}) 71newList = list.InsertRange(3, {nodeD, nodeE}) 134Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(-1, {nodeD})) 135Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(list.Count + 1, {nodeD})) 171newList = list.InsertRange(0, {nodeD, nodeE}) 182Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(1, {nodeD})) 183Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.InsertRange(-1, {nodeD}))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3081Return WithAccessorList(declaration, currentList.InsertRange(index, newList))