1 write to OriginalRoot
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxEditor.cs (1)
88OriginalRoot = root;
103 references to OriginalRoot
Microsoft.CodeAnalysis.CodeStyle.Fixes (22)
src\Analyzers\Core\CodeFixes\ConvertTypeOfToNameOf\AbstractConvertTypeOfToNameOfCodeFixProvider.cs (1)
41if (editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true) is not TMemberAccessExpressionSyntax node)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
51var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (3)
83var updatedRoot = SyntaxFormatting.GetFormattingResult(editor.OriginalRoot, [editor.OriginalRoot.FullSpan], formattingOptions, rules: default, cancellationToken).GetFormattedRoot(cancellationToken); 84editor.ReplaceNode(editor.OriginalRoot, updatedRoot);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
31var syntaxRoot = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (2)
47var root = editor.OriginalRoot; 51editor.ReplaceNode(editor.OriginalRoot, newRoot);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
44var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
76if (editor.OriginalRoot.FindNode(location.SourceSpan) is { } attribute && 85node = editor.OriginalRoot.FindTrivia(location.SourceSpan.Start).GetStructure()!;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
290editor.ReplaceNode(editor.OriginalRoot, newRoot);
src\Analyzers\Core\CodeFixes\SimplifyLinqExpression\SimplifyLinqExpressionCodeFixProvider.cs (1)
40var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
45var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
47var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
62var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseInferredMemberName\AbstractUseInferredMemberNameCodeFixProvider.cs (1)
35var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (3)
73var root = editor.OriginalRoot; 97var root = editor.OriginalRoot; 145var root = editor.OriginalRoot;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
63var originalRoot = editor.OriginalRoot;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
170var originalRoot = editor.OriginalRoot;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (18)
src\Analyzers\CSharp\CodeFixes\AddBraces\CSharpAddBracesCodeFixProvider.cs (1)
35var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
85var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceCodeFixProvider.cs (1)
63editor.OriginalRoot,
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
62var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
76var root = editor.OriginalRoot; 119var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
109var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
69var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\RemoveUnusedLocalFunction\CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
44var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
91editor.ReplaceNode(editor.OriginalRoot, subEditor.GetChangedRoot());
src\Analyzers\CSharp\CodeFixes\UseDefaultLiteral\CSharpUseDefaultLiteralCodeFixProvider.cs (1)
49var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseImplicitTypeCodeFixProvider.cs (1)
36var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
83var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
80var expression = editor.OriginalRoot.FindNode(location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
55var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
Microsoft.CodeAnalysis.CSharp.Features (27)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (3)
594var nodes = editor.OriginalRoot.DescendantNodes().Where(IsFixableNode).ToArray(); 598document = document.WithSyntaxRoot(editor.OriginalRoot.TrackNodes(nodes)); 621editor.ReplaceNode(editor.OriginalRoot, updatedRoot);
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (1)
105editor.ReplaceNode(editor.OriginalRoot, newRoot);
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (1)
55editor.ReplaceNode(editor.OriginalRoot, fixedRoot);
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (1)
56editor.ReplaceNode(editor.OriginalRoot, newRoot);
ConvertToRawString\ConvertStringToRawStringCodeRefactoringProvider.cs (1)
151var node = editor.OriginalRoot.FindNode(fixSpan);
src\Analyzers\CSharp\CodeFixes\AddBraces\CSharpAddBracesCodeFixProvider.cs (1)
35var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
85var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceCodeFixProvider.cs (1)
63editor.OriginalRoot,
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
62var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
76var root = editor.OriginalRoot; 119var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
109var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
69var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\RemoveUnusedLocalFunction\CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
44var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
91editor.ReplaceNode(editor.OriginalRoot, subEditor.GetChangedRoot());
src\Analyzers\CSharp\CodeFixes\UseDefaultLiteral\CSharpUseDefaultLiteralCodeFixProvider.cs (1)
49var originalRoot = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseImplicitTypeCodeFixProvider.cs (1)
36var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
83var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
80var expression = editor.OriginalRoot.FindNode(location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
55var root = editor.OriginalRoot;
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
44var root = editor.OriginalRoot;
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
260editor.ReplaceNode(editor.OriginalRoot, currentRoot);
UsePatternMatching\CSharpIsAndCastCheckWithoutNameCodeFixProvider.cs (1)
66editor.ReplaceNode(editor.OriginalRoot, updatedRoot);
Microsoft.CodeAnalysis.Features (26)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
206editor.ReplaceNode(editor.OriginalRoot, newRoot);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
689var root = editor.OriginalRoot;
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (3)
194var ifStatements = editor.OriginalRoot.DescendantNodes().OfType<TIfStatementSyntax>().ToArray(); 198document = document.WithSyntaxRoot(editor.OriginalRoot.TrackNodes(ifStatements)); 260editor.ReplaceNode(editor.OriginalRoot, updatedRoot);
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
307if (editor.OriginalRoot.Contains(nodeToReplace))
src\Analyzers\Core\CodeFixes\ConvertTypeOfToNameOf\AbstractConvertTypeOfToNameOfCodeFixProvider.cs (1)
41if (editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true) is not TMemberAccessExpressionSyntax node)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
51var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (3)
83var updatedRoot = SyntaxFormatting.GetFormattingResult(editor.OriginalRoot, [editor.OriginalRoot.FullSpan], formattingOptions, rules: default, cancellationToken).GetFormattedRoot(cancellationToken); 84editor.ReplaceNode(editor.OriginalRoot, updatedRoot);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
31var syntaxRoot = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (2)
47var root = editor.OriginalRoot; 51editor.ReplaceNode(editor.OriginalRoot, newRoot);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
44var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
76if (editor.OriginalRoot.FindNode(location.SourceSpan) is { } attribute && 85node = editor.OriginalRoot.FindTrivia(location.SourceSpan.Start).GetStructure()!;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
290editor.ReplaceNode(editor.OriginalRoot, newRoot);
src\Analyzers\Core\CodeFixes\SimplifyLinqExpression\SimplifyLinqExpressionCodeFixProvider.cs (1)
40var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
45var node = editor.OriginalRoot.FindNode(diagnostic.Location.SourceSpan, getInnermostNodeForTie: true);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
47var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
62var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseInferredMemberName\AbstractUseInferredMemberNameCodeFixProvider.cs (1)
35var root = editor.OriginalRoot;
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (3)
73var root = editor.OriginalRoot; 97var root = editor.OriginalRoot; 145var root = editor.OriginalRoot;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
79Dim trackedRoot = editor.OriginalRoot.TrackNodes(originalCastNodes) 90editor.ReplaceNode(editor.OriginalRoot, removedRoot)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
79Dim trackedRoot = editor.OriginalRoot.TrackNodes(originalCastNodes) 90editor.ReplaceNode(editor.OriginalRoot, removedRoot)
Microsoft.CodeAnalysis.Workspaces (6)
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
60var spans = fixAllSpans.HasValue ? fixAllSpans.Value : [editor.OriginalRoot.FullSpan];
Editing\SyntaxEditor.cs (3)
107var nodes = Enumerable.Distinct(_changes.Where(c => OriginalRoot.Contains(c.OriginalNode)) 109var newRoot = OriginalRoot.TrackNodes(nodes); 240if (OriginalRoot.Contains(node))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
63var originalRoot = editor.OriginalRoot;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
170var originalRoot = editor.OriginalRoot;