65 references to RemoveNode
Microsoft.AspNetCore.App.CodeFixes (1)
Kestrel\ListenOnIPv6AnyFixer.cs (1)
57var adjustedArgumentList = invocationExpressionSyntax.ArgumentList.RemoveNode(invocationExpressionSyntax.ArgumentList.Arguments.First(), SyntaxRemoveOptions.KeepLeadingTrivia);
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)
301? localDeclaration.RemoveNode(variableDeclarator, SyntaxRemoveOptions.KeepExteriorTrivia) 302: localDeclaration.RemoveNode(variableDeclarator, SyntaxRemoveOptions.KeepNoTrivia); 355return newScope.RemoveNode(globalStatement, SyntaxRemoveOptions.KeepNoTrivia); 358return 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)
2482var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2497var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2513var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2530var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2551var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2570var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2586var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2602var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2618var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2638var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2655var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2669var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2683var expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia); 2697var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia); 2711var expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia); 2729var m2 = m.RemoveNode(m.Body, SyntaxRemoveOptions.KeepExteriorTrivia); 2762var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepExteriorTrivia | SyntaxRemoveOptions.KeepUnbalancedDirectives); 2797var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepUnbalancedDirectives); 2837var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepDirectives); 2869var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 2886var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 2902var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine | SyntaxRemoveOptions.KeepDirectives); 2919var cu2 = cu.RemoveNode(cu, SyntaxRemoveOptions.KeepEndOfLine); 2961var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3002var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3046var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3088var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepTrailingTrivia); 3130var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3170var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3213var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepEndOfLine); 3254var cu2 = cu.RemoveNode(m, SyntaxRemoveOptions.KeepLeadingTrivia); 3278var 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)