959 references to SyntaxTree
ConfigurationSchemaGenerator (1)
GenerateDocumentationAndConfigFiles (32)
Metrics (16)
Metrics.Legacy (16)
Microsoft.Analyzers.Extra (2)
Microsoft.AspNetCore.App.Analyzers (3)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (5)
Microsoft.CodeAnalysis (34)
DiagnosticAnalyzer\AnalysisContextInfo.cs (3)
43this(compilation: compilation, operation: null, symbol: null, file: new SourceOrAdditionalFile(node.SyntaxTree), node)
48this(compilation: compilation, operation: operation, symbol: null, file: new SourceOrAdditionalFile(operation.Syntax.SyntaxTree), node: operation.Syntax)
53this(compilation: compilation, operation: null, symbol: symbol, file: new SourceOrAdditionalFile(node.SyntaxTree), node)
DiagnosticAnalyzer\AnalyzerExecutor.cs (6)
761Debug.Assert(!IsAnalyzerSuppressedForTree(syntaxNodeAction.Analyzer, node.SyntaxTree, cancellationToken));
955@this.GetControlFlowGraph, declaredNode.SyntaxTree, executionData.FilterSpan, executionData.IsGeneratedCode, cancellationToken);
985executionData.AnalyzerOptions, diagReporter.AddDiagnosticAction, isSupportedDiagnostic, @this.GetControlFlowGraph, declaredNode.SyntaxTree,
1024IsAnalyzerSuppressedForTree(executionData.Analyzer, declaredNode.SyntaxTree, cancellationToken))
1646_isGeneratedCodeLocation(node.SyntaxTree, node.Span, cancellationToken))
1658_isGeneratedCodeLocation(operation.Syntax.SyntaxTree, operation.Syntax.Span, cancellationToken))
Microsoft.CodeAnalysis.Analyzers (41)
Microsoft.CodeAnalysis.AnalyzerUtilities (21)
Microsoft.CodeAnalysis.BannedApiAnalyzers (34)
Microsoft.CodeAnalysis.CodeStyle (42)
Microsoft.CodeAnalysis.CodeStyle.Fixes (25)
Microsoft.CodeAnalysis.CSharp (41)
Microsoft.CodeAnalysis.CSharp.CodeStyle (36)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
70root.SyntaxTree,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (78)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
70root.SyntaxTree,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
CodeGeneration\CodeGenerationTests.cs (5)
92var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, root.SyntaxTree.Options);
316var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldSyntax.SyntaxTree.Options);
331var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldMemberSyntax.SyntaxTree.Options);
557var info = codeGenerator.GetInfo(CodeGenerationContext.Default, options, oldNode.SyntaxTree.Options);
598var info = codeGenerator.GetInfo(new CodeGenerationContext(reuseSyntax: true), options, declarationNode.SyntaxTree.Options);
Microsoft.CodeAnalysis.Features (111)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (25)
550var oldTree = oldRoot.SyntaxTree;
551var newTree = newRoot.SyntaxTree;
766oldRoot ??= GetEmptyRoot(newRoot!.SyntaxTree.Options);
767newRoot ??= GetEmptyRoot(oldRoot.SyntaxTree.Options);
773=> EmptyCompilationUnit.SyntaxTree.WithRootAndOptions(EmptyCompilationUnit, options).GetRoot(cancellationToken);
1034newExceptionRegions[i] = GetExceptionRegions(ancestors, newStatement.SyntaxTree, cancellationToken).Spans;
1178newActiveStatements[activeStatementIndex] = GetActiveStatementWithSpan(oldActiveStatements[activeStatementIndex], topMatch.NewRoot.SyntaxTree, newSpan, diagnostics, cancellationToken);
1565newExceptionRegions[ordinal] = GetExceptionRegions(newAncestors, newStatementSyntax.SyntaxTree, cancellationToken).Spans;
1758return GetExceptionRegions(ancestors, root.SyntaxTree, cancellationToken);
2222var oldTree = topMatch.OldRoot.SyntaxTree;
2223var newTree = topMatch.NewRoot.SyntaxTree;
2730var oldTree = editScript.Match.OldRoot.SyntaxTree;
2731var newTree = editScript.Match.NewRoot.SyntaxTree;
2766var newTypeDeclaration = GetSymbolDeclarationSyntax(newSymbol, refs => refs.First(r => r.SyntaxTree == edit.NewNode!.SyntaxTree), cancellationToken);
2803if (oldSymbol == null || oldDeclaration == null || oldDeclaration != null && oldDeclaration.SyntaxTree != oldModel.SyntaxTree)
2807else if (newSymbol == null || newDeclaration == null || newDeclaration != null && newDeclaration.SyntaxTree != newModel.SyntaxTree)
3372? new(await oldProject.Solution.GetRequiredDocument(oldDeclaration.SyntaxTree).GetRequiredNullableDisabledSemanticModelAsync(cancellationToken).ConfigureAwait(false))
5152var oldContainerDeclaration = analyzer.GetSymbolDeclarationSyntax(oldSymbol.ContainingSymbol, topMatch.OldRoot.SyntaxTree, cancellationToken);
5223span: (locationNode.SyntaxTree == newModel.SyntaxTree) ?
5520var oldSyntaxTree = topMatch.OldRoot.SyntaxTree;
5521var newSyntaxTree = topMatch.NewRoot.SyntaxTree;
5638if (newDeclaration?.SyntaxTree == newSyntaxTree)
6006static item => new RuntimeRudeEdit(item.Value.ToDiagnostic(item.Key.SyntaxTree).ToString(), (int)item.Value.Kind));
6790Debug.Assert(otherNode.SyntaxTree == otherRoot.SyntaxTree);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (4)
456var otherDocument = finalSolution.GetDocument(propertySyntax.SyntaxTree);
459var otherRoot = await propertySyntax.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
509codeGenerator.GetInfo(GetAddContext<IPropertySymbol>(parameter, blockStatement, typeDeclaration, cancellationToken), options, root.SyntaxTree.Options),
516codeGenerator.GetInfo(GetAddContext<IFieldSymbol>(parameter, blockStatement, typeDeclaration, cancellationToken), options, root.SyntaxTree.Options),
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (34)
Microsoft.CodeAnalysis.PublicApiAnalyzers (16)
Microsoft.CodeAnalysis.ResxSourceGenerator (16)
Microsoft.CodeAnalysis.Test.Utilities (12)
Diagnostics\CommonDiagnosticAnalyzers.cs (8)
2761ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterSymbolStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2765ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterSymbolStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2775ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax})", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2788ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterOperationBlockStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2798ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node})", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2804ReportDiagnostics("RegisterCodeBlockAction", codeBlockContext.CodeBlock.SyntaxTree, codeBlockContext.OwningSymbol, codeBlockContext.ReportDiagnostic));
2811ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterCodeBlockStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2815ReportDiagnostics("RegisterCodeBlockEndAction", codeBlockEndContext.CodeBlock.SyntaxTree, codeBlockEndContext.OwningSymbol, codeBlockEndContext.ReportDiagnostic));
Microsoft.CodeAnalysis.VisualBasic (36)
Microsoft.CodeAnalysis.Workspaces (52)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
SolutionTests\SolutionTests.cs (14)
616Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
617Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
643Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
644Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
667Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
668Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
2508Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm);
2540Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm);
3278Assert.Same(tree, root.SyntaxTree);
3723Assert.Equal(tree, root.SyntaxTree);
3740Assert.Equal(tree2, root2.SyntaxTree);
3816Assert.Same(tree2, tree2.GetRoot().SyntaxTree);
3844Assert.Same(tree3, tree3.GetRoot().SyntaxTree);
3855Assert.Same(tree4, tree4.GetRoot().SyntaxTree);
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.MetadataExtractor (4)
Microsoft.Gen.Metrics (2)
Microsoft.Gen.MetricsReports (2)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.VisualStudio.LanguageServices (3)
Microsoft.VisualStudio.LanguageServices.CSharp (30)
CodeModel\CSharpCodeModelService.NodeLocator.cs (27)
239return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
272return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
302return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
350return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
429return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
504return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
553return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
602return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
642return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
675return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
716return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
756return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
796return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
814return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
847return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
877return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
918return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
992return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1052return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1091return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1132return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1170return new VirtualTreePoint(fileScopedNamespace.SyntaxTree, text, fileScopedNamespace.Parent.Span.End);
1181return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1214return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1255return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1297return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1338return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
Microsoft.VisualStudio.LanguageServices.Implementation (4)
Roslyn.Diagnostics.Analyzers (35)
Roslyn.Diagnostics.CSharp.Analyzers (11)
System.Private.CoreLib.Generators (2)
System.Text.RegularExpressions.Generator (2)
System.Windows.Forms.PrivateSourceGenerators (1)
Test.Utilities (14)
Text.Analyzers (34)