241 references to SyntaxRemoveOptions
Microsoft.AspNetCore.App.CodeFixes (1)
PublicPartialProgramClassFixer.cs (1)
44editor.RemoveNode(classDeclaration, SyntaxRemoveOptions.KeepExteriorTrivia);
Microsoft.CodeAnalysis (4)
Syntax\SyntaxList.cs (1)
64protected internal override SyntaxNode RemoveNodesCore(IEnumerable<SyntaxNode> nodes, SyntaxRemoveOptions options)
Syntax\SyntaxNode.cs (1)
1599SyntaxRemoveOptions options);
Syntax\SyntaxNodeExtensions.cs (2)
265SyntaxRemoveOptions options) 281SyntaxRemoveOptions options)
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
81var newRoot = root.RemoveNodes(removedNodes, SyntaxRemoveOptions.KeepNoTrivia);
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
98editor.RemoveNode(fieldDeclaration, SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
75var options = SyntaxGenerator.DefaultRemoveOptions; 81options |= SyntaxRemoveOptions.KeepLeadingTrivia;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (4)
648var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 657removeOptions = SyntaxRemoveOptions.KeepNoTrivia; 661removeOptions |= SyntaxRemoveOptions.KeepLeadingTrivia; 900var rootWithRemovedDeclaration = root.RemoveNode(newDecl, SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
93editor.RemoveNode(match.Node, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (4)
15public static SyntaxRemoveOptions GetRemoveOptions( 18var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 21removeOptions |= SyntaxRemoveOptions.KeepLeadingTrivia; 26removeOptions |= SyntaxRemoveOptions.KeepTrailingTrivia;
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
84editor.RemoveNode(match.Statement, SyntaxRemoveOptions.KeepUnbalancedDirectives);
Microsoft.CodeAnalysis.CSharp (28)
Syntax\CSharpSyntaxNode.cs (1)
505protected internal override SyntaxNode? RemoveNodesCore(IEnumerable<SyntaxNode> nodes, SyntaxRemoveOptions options)
Syntax\SyntaxNodeRemover.cs (27)
19SyntaxRemoveOptions options) 51private readonly SyntaxRemoveOptions _options; 58SyntaxRemoveOptions options) 295if ((_options & SyntaxRemoveOptions.KeepLeadingTrivia) != 0) 299else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 304if ((_options & (SyntaxRemoveOptions.KeepDirectives | SyntaxRemoveOptions.KeepUnbalancedDirectives)) != 0) 309if ((_options & SyntaxRemoveOptions.KeepTrailingTrivia) != 0) 313else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 318if ((_options & SyntaxRemoveOptions.AddElasticMarker) != 0) 327if ((_options & SyntaxRemoveOptions.KeepLeadingTrivia) != 0) 333else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 342if ((_options & (SyntaxRemoveOptions.KeepDirectives | SyntaxRemoveOptions.KeepUnbalancedDirectives)) != 0) 349if ((_options & SyntaxRemoveOptions.KeepTrailingTrivia) != 0) 353else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 358if ((_options & SyntaxRemoveOptions.AddElasticMarker) != 0) 367if ((_options & SyntaxRemoveOptions.KeepLeadingTrivia) != 0) 371else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 376if ((_options & (SyntaxRemoveOptions.KeepDirectives | SyntaxRemoveOptions.KeepUnbalancedDirectives)) != 0) 383if ((_options & SyntaxRemoveOptions.KeepTrailingTrivia) != 0) 389else if ((_options & SyntaxRemoveOptions.KeepEndOfLine) != 0) 398if ((_options & SyntaxRemoveOptions.AddElasticMarker) != 0) 408if ((_options & SyntaxRemoveOptions.KeepLeadingTrivia) != 0) 413if ((_options & SyntaxRemoveOptions.KeepTrailingTrivia) != 0) 440if ((_options & SyntaxRemoveOptions.KeepDirectives) != 0)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (17)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
28private const SyntaxRemoveOptions RemovalOptions = 29SyntaxRemoveOptions.KeepExteriorTrivia | 30SyntaxRemoveOptions.KeepDirectives | 31SyntaxRemoveOptions.AddElasticMarker;
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
177: localDeclarationStatement, SyntaxRemoveOptions.KeepNoTrivia);
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
152editor.RemoveNode(localDeclarationStatement, SyntaxRemoveOptions.KeepLeadingTrivia | SyntaxRemoveOptions.AddElasticMarker);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
91editor.RemoveNode(statement, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (4)
82var removalOptions = SyntaxRemoveOptions.KeepUnbalancedDirectives | SyntaxRemoveOptions.AddElasticMarker; 84removalOptions |= SyntaxRemoveOptions.KeepLeadingTrivia;
src\Analyzers\CSharp\CodeFixes\UseInferredMemberName\CSharpUseInferredMemberNameCodeFixProvider.cs (2)
19=> editor.RemoveNode(node, SyntaxRemoveOptions.KeepExteriorTrivia | SyntaxRemoveOptions.AddElasticMarker);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (2)
74editor.RemoveNode(statement, SyntaxRemoveOptions.KeepNoTrivia); 126editor.RemoveNode(declarator, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
173SyntaxRemoveOptions GetConstructorRemovalOptions()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Formatting\CodeCleanupTests.TestFixers.cs (3)
38var newRoot = root.RemoveNode(node.Parent, SyntaxRemoveOptions.KeepNoTrivia); 107var newRoot = root.RemoveNode(node.Parent, SyntaxRemoveOptions.KeepNoTrivia); 163var newRoot = root.RemoveNode(node.Parent, SyntaxRemoveOptions.KeepNoTrivia);
Microsoft.CodeAnalysis.CSharp.Features (24)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
222editor.RemoveNode(localFunction, SyntaxRemoveOptions.KeepNoTrivia);
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);
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
183editor.RemoveNode(whenClause, SyntaxRemoveOptions.AddElasticMarker);
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
117return root.RemoveNode(declarator, SyntaxRemoveOptions.KeepNoTrivia);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
28private const SyntaxRemoveOptions RemovalOptions = 29SyntaxRemoveOptions.KeepExteriorTrivia | 30SyntaxRemoveOptions.KeepDirectives | 31SyntaxRemoveOptions.AddElasticMarker;
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
177: localDeclarationStatement, SyntaxRemoveOptions.KeepNoTrivia);
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
152editor.RemoveNode(localDeclarationStatement, SyntaxRemoveOptions.KeepLeadingTrivia | SyntaxRemoveOptions.AddElasticMarker);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
91editor.RemoveNode(statement, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (4)
82var removalOptions = SyntaxRemoveOptions.KeepUnbalancedDirectives | SyntaxRemoveOptions.AddElasticMarker; 84removalOptions |= SyntaxRemoveOptions.KeepLeadingTrivia;
src\Analyzers\CSharp\CodeFixes\UseInferredMemberName\CSharpUseInferredMemberNameCodeFixProvider.cs (2)
19=> editor.RemoveNode(node, SyntaxRemoveOptions.KeepExteriorTrivia | SyntaxRemoveOptions.AddElasticMarker);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (2)
74editor.RemoveNode(statement, SyntaxRemoveOptions.KeepNoTrivia); 126editor.RemoveNode(declarator, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
173SyntaxRemoveOptions GetConstructorRemovalOptions()
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (37)
Syntax\SyntaxNodeTests.cs (35)
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.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
2986public override SyntaxNode RemoveNode(SyntaxNode root, SyntaxNode node, SyntaxRemoveOptions options) 3007private SyntaxNode RemoveNodeInternal(SyntaxNode root, SyntaxNode declaration, SyntaxRemoveOptions options)
Microsoft.CodeAnalysis.Features (32)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (2)
143var newRoot = root.RemoveNodes(attributesToRemove, SyntaxRemoveOptions.KeepLeadingTrivia | SyntaxRemoveOptions.AddElasticMarker);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (2)
130documentEditor.RemoveNode(member, SyntaxRemoveOptions.KeepNoTrivia); 194documentEditor.RemoveNode(State.TypeNode, SyntaxRemoveOptions.KeepUnbalancedDirectives);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
53editor.RemoveNode(typeToMove, SyntaxRemoveOptions.KeepNoTrivia); 70editor.RemoveNode(nodeToRemove, SyntaxRemoveOptions.KeepNoTrivia);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
213root = root.RemoveNodes(members, SyntaxRemoveOptions.KeepUnbalancedDirectives);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
373SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
54root = root.RemoveNodes(nodesToRemove, SyntaxRemoveOptions.KeepNoTrivia);
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (5)
125var removeOptions = CreateSyntaxRemoveOptions(localDeclaration, blockFacts); 129private static SyntaxRemoveOptions CreateSyntaxRemoveOptions( 133var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 139removeOptions |= SyntaxRemoveOptions.KeepLeadingTrivia; 156removeOptions &= ~SyntaxRemoveOptions.AddElasticMarker;
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
81var newRoot = root.RemoveNodes(removedNodes, SyntaxRemoveOptions.KeepNoTrivia);
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
98editor.RemoveNode(fieldDeclaration, SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
75var options = SyntaxGenerator.DefaultRemoveOptions; 81options |= SyntaxRemoveOptions.KeepLeadingTrivia;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (4)
648var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 657removeOptions = SyntaxRemoveOptions.KeepNoTrivia; 661removeOptions |= SyntaxRemoveOptions.KeepLeadingTrivia; 900var rootWithRemovedDeclaration = root.RemoveNode(newDecl, SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
93editor.RemoveNode(match.Node, SyntaxRemoveOptions.KeepUnbalancedDirectives);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (4)
15public static SyntaxRemoveOptions GetRemoveOptions( 18var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 21removeOptions |= SyntaxRemoveOptions.KeepLeadingTrivia; 26removeOptions |= SyntaxRemoveOptions.KeepTrailingTrivia;
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
84editor.RemoveNode(match.Statement, SyntaxRemoveOptions.KeepUnbalancedDirectives);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (4)
236var syntaxRemoveOptions = CreateSyntaxRemoveOptions(nodeToRemove); 309private static SyntaxRemoveOptions CreateSyntaxRemoveOptions(SyntaxNode nodeToRemove) 311var syntaxRemoveOptions = SyntaxGenerator.DefaultRemoveOptions; 316syntaxRemoveOptions |= SyntaxRemoveOptions.KeepLeadingTrivia;
Microsoft.CodeAnalysis.VisualBasic (28)
Syntax\SyntaxNodeRemover.vb (27)
16Friend Shared Function RemoveNodes(Of TRoot As SyntaxNode)(root As TRoot, nodes As IEnumerable(Of SyntaxNode), options As SyntaxRemoveOptions) As TRoot 39Private ReadOnly _options As SyntaxRemoveOptions 44Public Sub New(nodes As SyntaxNode(), options As SyntaxRemoveOptions) 212If (Me._options And SyntaxRemoveOptions.KeepLeadingTrivia) <> 0 Then 214ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetLeadingTrivia()) Then 218If (Me._options And (SyntaxRemoveOptions.KeepDirectives Or SyntaxRemoveOptions.KeepUnbalancedDirectives)) <> 0 Then 222If (Me._options And SyntaxRemoveOptions.KeepTrailingTrivia) <> 0 Then 224ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetTrailingTrivia()) Then 228If (Me._options And SyntaxRemoveOptions.AddElasticMarker) <> 0 Then 234If (Me._options And SyntaxRemoveOptions.KeepLeadingTrivia) <> 0 Then 238ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso 243If (Me._options And (SyntaxRemoveOptions.KeepDirectives Or SyntaxRemoveOptions.KeepUnbalancedDirectives)) <> 0 Then 249If (Me._options And SyntaxRemoveOptions.KeepTrailingTrivia) <> 0 Then 251ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetTrailingTrivia()) Then 255If (Me._options And SyntaxRemoveOptions.AddElasticMarker) <> 0 Then 261If (Me._options And SyntaxRemoveOptions.KeepLeadingTrivia) <> 0 Then 263ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso HasEndOfLine(node.GetLeadingTrivia()) Then 267If (Me._options And (SyntaxRemoveOptions.KeepDirectives Or SyntaxRemoveOptions.KeepUnbalancedDirectives)) <> 0 Then 273If (Me._options And SyntaxRemoveOptions.KeepTrailingTrivia) <> 0 Then 277ElseIf (Me._options And SyntaxRemoveOptions.KeepEndOfLine) <> 0 AndAlso 282If (Me._options And SyntaxRemoveOptions.AddElasticMarker) <> 0 Then 289If (Me._options And SyntaxRemoveOptions.KeepLeadingTrivia) <> 0 Then 292If (Me._options And SyntaxRemoveOptions.KeepTrailingTrivia) <> 0 Then 311If (Me._options And SyntaxRemoveOptions.KeepDirectives) <> 0 Then
Syntax\VisualBasicSyntaxNode.vb (1)
404Protected Overrides Function RemoveNodesCore(nodes As IEnumerable(Of SyntaxNode), options As SyntaxRemoveOptions) As SyntaxNode
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsRewriter.vb (1)
41Return node.RemoveNodes(node.ImportsClauses.Where(AddressOf _unnecessaryImports.Contains), SyntaxRemoveOptions.KeepNoTrivia)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
77subStatement = subStatement.RemoveNode(subStatement.AsClause, SyntaxRemoveOptions.KeepTrailingTrivia)
src\Analyzers\VisualBasic\CodeFixes\UseInferredMemberName\VisualBasicUseInferredMemberNameCodeFixProvider.vb (2)
25editor.RemoveNode(node, SyntaxRemoveOptions.KeepExteriorTrivia Or SyntaxRemoveOptions.AddElasticMarker)
Microsoft.CodeAnalysis.VisualBasic.Features (9)
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)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.CallSiteContainerRewriter.vb (1)
50result = result.RemoveNodes(nodesToRemove, SyntaxRemoveOptions.KeepNoTrivia)
IntroduceVariable\VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb (2)
44SyntaxRemoveOptions.KeepUnbalancedDirectives Or SyntaxRemoveOptions.AddElasticMarker)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
77subStatement = subStatement.RemoveNode(subStatement.AsClause, SyntaxRemoveOptions.KeepTrailingTrivia)
src\Analyzers\VisualBasic\CodeFixes\UseInferredMemberName\VisualBasicUseInferredMemberNameCodeFixProvider.vb (2)
25editor.RemoveNode(node, SyntaxRemoveOptions.KeepExteriorTrivia Or SyntaxRemoveOptions.AddElasticMarker)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (16)
Syntax\SyntaxRewriterTests.vb (2)
500Dim newRoot = oldRoot.RemoveNode(xmlNode, SyntaxRemoveOptions.KeepDirectives) 686Dim newRoot = root.RemoveNode(root.DescendantNodes().First(), SyntaxRemoveOptions.KeepDirectives)
TestSyntaxNodes.vb (14)
2539Dim expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepExteriorTrivia) 2553Dim expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2567Dim expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia) 2581Dim expr2 = expr.RemoveNode(b, SyntaxRemoveOptions.KeepNoTrivia) 2594Dim expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2607Dim expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2620Dim expr2 = expr.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2643Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2668Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2693Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia) 2724Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepUnbalancedDirectives) 2763Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepExteriorTrivia Or SyntaxRemoveOptions.KeepUnbalancedDirectives) 2805Dim cu2 = cu.RemoveNode(n, SyntaxRemoveOptions.KeepDirectives)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
3601Public Overrides Function RemoveNode(root As SyntaxNode, declaration As SyntaxNode, options As SyntaxRemoveOptions) As SyntaxNode 3609Private Shared Function RemoveNodeInternal(root As SyntaxNode, node As SyntaxNode, options As SyntaxRemoveOptions) As SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsRewriter.vb (1)
41Return node.RemoveNodes(node.ImportsClauses.Where(AddressOf _unnecessaryImports.Contains), SyntaxRemoveOptions.KeepNoTrivia)
Microsoft.CodeAnalysis.Workspaces (5)
Editing\SyntaxEditor.cs (1)
138public void RemoveNode(SyntaxNode node, SyntaxRemoveOptions options)
Editing\SyntaxGenerator.cs (4)
34public static readonly SyntaxRemoveOptions DefaultRemoveOptions = SyntaxRemoveOptions.KeepUnbalancedDirectives | SyntaxRemoveOptions.AddElasticMarker; 1409public virtual SyntaxNode RemoveNode(SyntaxNode root, SyntaxNode node, SyntaxRemoveOptions options)
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)