7 references to TryGetSyntaxRoot
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
81if (document.TryGetSyntaxRoot(out var root))
Microsoft.CodeAnalysis.Features (2)
SolutionCrawler\AbstractDocumentDifferenceService.cs (2)
55if (!oldDocument.TryGetSyntaxRoot(out var oldRoot) || 56!newDocument.TryGetSyntaxRoot(out var newRoot))
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
81if (document.TryGetSyntaxRoot(out var root))
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (3)
310Assert.True(newSolution1.GetDocument(documentId)!.TryGetSyntaxRoot(out var actualRoot)); 3143Assert.False(document.TryGetSyntaxRoot(out _)); 3149Assert.True(document.TryGetSyntaxRoot(out root));