64 references to RemoveNode
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
900var rootWithRemovedDeclaration = root.RemoveNode(newDecl, SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\CodeCleanupTests.TestFixers.cs (1)
38var newRoot = root.RemoveNode(node.Parent, SyntaxRemoveOptions.KeepNoTrivia);
Microsoft.CodeAnalysis.CSharp.Features (6)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (4)
305? localDeclaration.RemoveNode(variableDeclarator, SyntaxRemoveOptions.KeepExteriorTrivia) 306: localDeclaration.RemoveNode(variableDeclarator, SyntaxRemoveOptions.KeepNoTrivia); 359return newScope.RemoveNode(globalStatement, SyntaxRemoveOptions.KeepNoTrivia); 362return newScope.RemoveNode(newLocalDeclaration, SyntaxRemoveOptions.KeepNoTrivia);
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
48newRoot = newRoot.RemoveNode(oldClassDeclaration, SyntaxGenerator.DefaultRemoveOptions);
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
117return root.RemoveNode(declarator, SyntaxRemoveOptions.KeepNoTrivia);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (34)
Syntax\SyntaxNodeTests.cs (32)
2459var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2474var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2490var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2507var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2528var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2547var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2563var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2579var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2595var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2615var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2632var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2646var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2660var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2674var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2688var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2706var m2 = m.RemoveNode(m.Body, SyntaxRemoveOptions.KeepExteriorTrivia); 2739var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepExteriorTrivia | SyntaxRemoveOptions.KeepUnbalancedDirectives); 2774var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepUnbalancedDirectives); 2814var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepDirectives); 2846var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 2863var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 2879var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine | SyntaxRemoveOptions.KeepDirectives); 2896var cu2 = cu.RemoveNode(cu, SyntaxRemoveOptions.KeepEndOfLine); 2938var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 2979var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3023var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3065var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepTrailingTrivia); 3107var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3147var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3190var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3231var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepLeadingTrivia); 3255var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine | SyntaxRemoveOptions.KeepDirectives);
Syntax\SyntaxRewriterTests.cs (2)
516var newRoot = root.RemoveNode(root.DescendantNodes().First(), SyntaxRemoveOptions.KeepDirectives); 652var newRoot = oldRoot.RemoveNode(xmlNode, SyntaxRemoveOptions.KeepDirectives);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
77subStatement = subStatement.RemoveNode(subStatement.AsClause, SyntaxRemoveOptions.KeepTrailingTrivia)
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (2)
262Return localDeclaration.RemoveNode(variableDeclarator, SyntaxRemoveOptions.KeepEndOfLine) 266Return localDeclaration.RemoveNode(modifiedIdentifier, SyntaxRemoveOptions.KeepEndOfLine)
CodeRefactorings\RemoveStatementCodeAction.vb (1)
31Dim updatedRoot = root.RemoveNode(_node, SyntaxRemoveOptions.KeepUnbalancedDirectives)
IntroduceVariable\VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb (1)
42Return localDeclaration.RemoveNode(
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
77subStatement = subStatement.RemoveNode(subStatement.AsClause, SyntaxRemoveOptions.KeepTrailingTrivia)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3671Return root.RemoveNode(node, options)
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1410=> root.RemoveNode(node, options) ?? throw new InvalidOperationException($"Can't remove root node.");
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
2761var newFieldDeclaration = fieldDeclaration.RemoveNode(node, SyntaxRemoveOptions.KeepNoTrivia); 2808var newAttributeList = attributeList.RemoveNode(node, SyntaxRemoveOptions.KeepNoTrivia); 2819var newArgumentList = argumentList.RemoveNode(node, SyntaxRemoveOptions.KeepNoTrivia); 2829var newParameterList = parameterList.RemoveNode(node, SyntaxRemoveOptions.KeepNoTrivia);
Microsoft.VisualStudio.LanguageServices.VisualBasic (10)
CodeModel\VisualBasicCodeModelService.vb (10)
1331Dim newDeclarator = declarator.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1344Dim newDeclaration = declaration.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1364Dim newAttributeList = attributeList.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine) 1372Dim newArgumentList = argumentList.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1379Dim newParameterList = parameterList.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 3541parameter = parameter.RemoveNode(parameter.Default, SyntaxRemoveOptions.KeepNoTrivia) 3560variableDeclarator = variableDeclarator.RemoveNode(variableDeclarator.Initializer, SyntaxRemoveOptions.KeepExteriorTrivia) 3582enumMemberDeclaration = enumMemberDeclaration.RemoveNode(enumMemberDeclaration.Initializer, SyntaxRemoveOptions.KeepExteriorTrivia) 4301Dim newInheritsStatement = inheritsStatement.RemoveNode(inheritsType, SyntaxRemoveOptions.KeepEndOfLine) 4373Dim newImplementsStatement = implementsStatement.RemoveNode(inheritsType, SyntaxRemoveOptions.KeepEndOfLine)