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