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