1 write to Root
Microsoft.CodeAnalysis.Workspaces (1)
SyntacticDocument.cs (1)
22
Root
= root;
57 references to Root
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
233
var root = document.
Root
;
Microsoft.CodeAnalysis.CSharp.Features (17)
ExtractMethod\CSharpMethodExtractor.cs (1)
155
return await selection.SemanticDocument.WithSyntaxRootAsync(selection.SemanticDocument.
Root
.ReplaceNode(lastExpression, newExpression), cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (3)
610
var isLocalFunction = LocalFunction && ShouldLocalFunctionCaptureParameter(SemanticDocument.
Root
);
687
var root = newDocument.
Root
;
758
var syntaxNode = originalDocument.
Root
.GetAnnotatedNodesAndTokens(MethodDefinitionAnnotation).FirstOrDefault().AsNode();
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (1)
25
var root = selectionResult.SemanticDocument.
Root
;
ExtractMethod\CSharpSelectionValidator.cs (1)
45
var root = SemanticDocument.
Root
;
GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (3)
39
if (helpers.IsOnTypeHeader(semanticDocument.
Root
, textSpan.Start, out var typeDeclaration) ||
40
helpers.IsBetweenTypeMembers(semanticDocument.Text, semanticDocument.
Root
, textSpan.Start, out typeDeclaration))
47
var node = semanticDocument.
Root
.FindToken(textSpan.Start).GetAncestor<TypeSyntax>();
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (2)
61
var newRoot = document.
Root
.ReplaceNode(oldTypeDeclaration, finalTypeDeclaration);
66
var oldCompilationUnit = (CompilationUnitSyntax)document.
Root
;
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (4)
114
var newRoot = document.
Root
.ReplaceNode(oldLambda, newLambda);
244
var newRoot = document.
Root
.ReplaceNode(oldParentingNode, WithBlockBody(oldParentingNode, newBody));
310
expression = document.
Root
.GetCurrentNode(expression);
312
var root = document.
Root
;
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (2)
71
var newRoot = document.
Root
.ReplaceNode(oldInnerMostCommonQuery, finalQuery);
91
var newRoot = document.
Root
.ReplaceNode(oldQuery, newQuery);
Microsoft.CodeAnalysis.Features (24)
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (3)
111
var manyTypes = MultipleTopLevelTypeDeclarationInSourceDocument(state.SemanticDocument.
Root
);
117
: ClassNextToGlobalStatements(state.SemanticDocument.
Root
, syntaxFacts);
190
var root = state.SemanticDocument.
Root
;
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
124
var root = SemanticDocument.
Root
;
CodeRefactorings\MoveType\AbstractMoveTypeService.State.cs (1)
58
var root = SemanticDocument.
Root
;
ExtractMethod\Extensions.cs (1)
66
=> document.
Root
.GetAnnotatedNodesAndTokens(annotation).Single().AsToken();
ExtractMethod\InsertionPoint.cs (3)
21
var root = document.
Root
;
40
=> SemanticDocument.
Root
;
53
var root = SemanticDocument.
Root
;
ExtractMethod\MethodExtractor.Analyzer.cs (1)
346
return document.WithSyntaxRootAsync(document.
Root
.AddAnnotations(annotations), cancellationToken);
ExtractMethod\MethodExtractor.CodeGenerator.cs (4)
86
var root = SemanticDocument.
Root
;
91
var newCallSiteRoot = callSiteDocument.
Root
;
153
var finalRoot = finalDocument.
Root
;
349
var isLocalFunction = LocalFunction && ShouldLocalFunctionCaptureParameter(SemanticDocument.
Root
);
ExtractMethod\MethodExtractor.cs (1)
111
var newRoot = semanticDocumentWithoutFinalFormatting.
Root
;
ExtractMethod\MethodExtractor.TriviaResult.cs (1)
42
var root = document.
Root
;
ExtractMethod\SelectionResult.cs (1)
149
foreach (var node in SemanticDocument.
Root
.DescendantNodesAndSelf())
GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
69
if (headerFacts.IsOnTypeHeader(semanticDocument.
Root
, textSpan.Start, fullHeader: true, out _))
IntroduceVariable\AbstractIntroduceVariableService.cs (5)
229
var destination = state.Expression.GetAncestor<TTypeDeclarationSyntax>() ?? state.Document.
Root
;
455
var newRoot = semanticDocument.
Root
.TrackNodes(matches);
458
var newMatches = newSemanticDocument.
Root
.GetCurrentNodes(matches.AsEnumerable()).ToSet();
466
newRoot = await newSemanticDocument.
Root
488
newMatches = newSemanticDocument.
Root
.GetCurrentNodes(matches.AsEnumerable()).ToSet();
TaskList\AbstractTaskListService.cs (1)
66
foreach (var trivia in syntaxDoc.
Root
.DescendantTrivia())
Microsoft.CodeAnalysis.VisualBasic.Features (14)
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (1)
17
Dim root = selectionResult.SemanticDocument.
Root
ExtractMethod\VisualBasicMethodExtractor.vb (1)
69
Return Await selection.SemanticDocument.WithSyntaxRootAsync(selection.SemanticDocument.
Root
.ReplaceNode(lastExpression, newStatement), cancellationToken).ConfigureAwait(False)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
420
Dim root = newDocument.
Root
ExtractMethod\VisualBasicSelectionResult.vb (1)
36
Dim root = document.
Root
ExtractMethod\VisualBasicSelectionValidator.vb (1)
30
Dim root = SemanticDocument.
Root
GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (2)
33
If headerFacts.IsOnTypeHeader(semanticDocument.
Root
, textSpan.Start, typeDecl) Then
38
Dim token = semanticDocument.
Root
.FindToken(textSpan.Start)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (1)
41
Dim oldCompilationUnit = DirectCast(document.
Root
, CompilationUnitSyntax)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceLocal.vb (4)
95
Dim newRoot = document.
Root
.ReplaceNode(oldLambda, newLambda)
141
expression = document.
Root
.GetCurrentNodes(expression).First()
158
Dim newRoot = document.
Root
.ReplaceNode(oldInnerMostCommonBlock, finalInnerMostBlock)
191
Dim oldRoot = semanticDocument.
Root
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceQueryLocal.vb (2)
62
Dim newRoot = document.
Root
.ReplaceNode(oldInnerMostCommonQuery, finalQuery)
81
Dim newRoot = document.
Root
.ReplaceNode(oldQuery, newQuery)
Microsoft.CodeAnalysis.Workspaces (1)
SyntacticDocument.cs (1)
26
public SyntaxTree SyntaxTree =>
Root
.SyntaxTree;