751 references to SyntaxTree
ConfigurationSchemaGenerator (1)
Microsoft.Analyzers.Extra (2)
Microsoft.AspNetCore.App.Analyzers (3)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (5)
Microsoft.CodeAnalysis (35)
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 (7)
648Debug.Assert(!IsAnalyzerSuppressedForTree(syntaxNodeAction.Analyzer, node.SyntaxTree, cancellationToken));
771IsAnalyzerSuppressedForTree(analyzer, declaredNode.SyntaxTree, cancellationToken))
824GetControlFlowGraph, declaredNode.SyntaxTree, filterSpan, isGeneratedCode, cancellationToken);
886Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, declaredNode.SyntaxTree, cancellationToken));
909AnalyzerOptions, addDiagnostic, isSupportedDiagnostic, GetControlFlowGraph, declaredNode.SyntaxTree, filterSpan, isGeneratedCode, cancellationToken);
1469_isGeneratedCodeLocation(node.SyntaxTree, node.Span, cancellationToken))
1481_isGeneratedCodeLocation(operation.Syntax.SyntaxTree, operation.Syntax.Span, cancellationToken))
Microsoft.CodeAnalysis.CodeStyle (35)
Microsoft.CodeAnalysis.CodeStyle.Fixes (13)
Microsoft.CodeAnalysis.CSharp (39)
Microsoft.CodeAnalysis.CSharp.CodeStyle (33)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
71root.SyntaxTree,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (50)
Semantics\PrimaryConstructorTests.cs (11)
2186var xxDecl = OutVarTests.GetOutVarDeclaration(speculativePrimaryInitializer.SyntaxTree, "xx");
2187var xxRef = OutVarTests.GetReferences(speculativePrimaryInitializer.SyntaxTree, "xx").ToArray();
3802Assert.Same(literal.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3828Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3846Assert.Same(initializer.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3877Assert.Same(baseType.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3904Assert.Same(@class.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
5291Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5309Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5327Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5356Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
Microsoft.CodeAnalysis.CSharp.Features (56)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
71root.SyntaxTree,
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (23)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (67)
Syntax\SyntaxRewriterTests.cs (43)
315Assert.NotNull(node.SyntaxTree);
316Assert.False(node.SyntaxTree.HasCompilationUnitRoot, "how did we get a CompilationUnit root?");
317Assert.Same(node, node.SyntaxTree.GetRoot());
324Assert.NotNull(node1.SyntaxTree);
325Assert.True(node1.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?");
326Assert.Same(node1, node1.SyntaxTree.GetRoot());
328Assert.NotNull(node2.SyntaxTree);
329Assert.False(node2.SyntaxTree.HasCompilationUnitRoot, "how did we get a CompilationUnit root?");
330Assert.Same(node2, node2.SyntaxTree.GetRoot());
338Assert.Same(tree, tree.GetCompilationUnitRoot().ReplaceToken(tokenT, tokenT).SyntaxTree);
340Assert.NotNull(newRoot.SyntaxTree);
341Assert.True(newRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?");
342Assert.Same(newRoot, newRoot.SyntaxTree.GetRoot());
350Assert.Same(tree, tree.GetCompilationUnitRoot().ReplaceNode(typeName, typeName).SyntaxTree);
352Assert.NotNull(newRoot.SyntaxTree);
353Assert.True(newRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?");
354Assert.Same(newRoot, newRoot.SyntaxTree.GetRoot());
367var newTree = newRoot.SyntaxTree;
386var newTree = newRoot.SyntaxTree;
406var newTree = newNode.SyntaxTree;
413var newTree2 = newNode2.SyntaxTree;
433var newTree = newRoot.SyntaxTree;
450var newTree = newRoot.SyntaxTree;
456var newTree2 = newRoot2.SyntaxTree;
477var newTree = newRoot.SyntaxTree;
483var newTree2 = newRoot2.SyntaxTree;
505var newTree = newRoot.SyntaxTree;
518var newTree = newRoot.SyntaxTree;
531var newTree = newRoot.SyntaxTree;
540Assert.NotNull(tree.GetCompilationUnitRoot().SyntaxTree);
543Assert.NotNull(rewrittenRoot.SyntaxTree);
544Assert.True(rewrittenRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?");
545Assert.Same(rewrittenRoot, rewrittenRoot.SyntaxTree.GetRoot());
558Assert.NotNull(expr1.SyntaxTree);
559Assert.False(expr1.SyntaxTree.HasCompilationUnitRoot, "how did we get a CompilationUnit root?");
560Assert.Same(ifStmt1, expr1.SyntaxTree.GetRoot());
576Assert.NotNull(expr2.SyntaxTree);
577Assert.False(expr2.SyntaxTree.HasCompilationUnitRoot, "how did we get a CompilationUnit root?");
578Assert.Same(ifStmt2, expr2.SyntaxTree.GetRoot());
606Assert.Equal(tree1, expr1.SyntaxTree);
622Assert.NotNull(expr2.SyntaxTree);
623Assert.False(expr2.SyntaxTree.HasCompilationUnitRoot, "how did we get a CompilationUnit root?");
624Assert.Same(ifStmt2, expr2.SyntaxTree.GetRoot());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeGeneration\CodeGenerationTests.cs (5)
93var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, root.SyntaxTree.Options);
314var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldSyntax.SyntaxTree.Options);
329var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldMemberSyntax.SyntaxTree.Options);
540var info = codeGenerator.GetInfo(CodeGenerationContext.Default, options, oldNode.SyntaxTree.Options);
581var info = codeGenerator.GetInfo(new CodeGenerationContext(reuseSyntax: true), options, declarationNode.SyntaxTree.Options);
Microsoft.CodeAnalysis.Features (59)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (6)
862newExceptionRegions[i] = GetExceptionRegions(ancestors, newStatement.SyntaxTree, cancellationToken).Spans;
1004newActiveStatements[activeStatementIndex] = GetActiveStatementWithSpan(oldActiveStatements[activeStatementIndex], topMatch.NewRoot.SyntaxTree, newSpan, diagnostics, cancellationToken);
1388newExceptionRegions[ordinal] = GetExceptionRegions(newAncestors, newStatementSyntax.SyntaxTree, cancellationToken).Spans;
1581return GetExceptionRegions(ancestors, root.SyntaxTree, cancellationToken);
2045var oldTree = topMatch.OldRoot.SyntaxTree;
2046var newTree = topMatch.NewRoot.SyntaxTree;
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Test.Utilities (12)
Diagnostics\CommonDiagnosticAnalyzers.cs (8)
2758ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterSymbolStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2762ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterSymbolStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2772ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax})", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2785ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterOperationBlockStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2795ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node})", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2801ReportDiagnostics("RegisterCodeBlockAction", codeBlockContext.CodeBlock.SyntaxTree, codeBlockContext.OwningSymbol, codeBlockContext.ReportDiagnostic));
2808ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterCodeBlockStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic),
2812ReportDiagnostics("RegisterCodeBlockEndAction", codeBlockEndContext.CodeBlock.SyntaxTree, codeBlockEndContext.OwningSymbol, codeBlockEndContext.ReportDiagnostic));
Microsoft.CodeAnalysis.VisualBasic (36)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (5)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Features (10)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (9)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (16)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (13)
Microsoft.CodeAnalysis.Workspaces (48)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Metrics (2)
Microsoft.Gen.MetricsReports (2)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.VisualStudio.LanguageServices (4)
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.VisualBasic (42)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (39)
249Return New VirtualTreePoint(attributes.First().SyntaxTree, text, startPosition)
281Return New VirtualTreePoint(attributes.Last().SyntaxTree, text, startPosition)
357Return New VirtualTreePoint(typeBlock.SyntaxTree, text, startPosition)
383Return New VirtualTreePoint(typeBlock.SyntaxTree, text, startPosition)
428Return New VirtualTreePoint(enumBlock.SyntaxTree, text, startPosition)
454Return New VirtualTreePoint(enumBlock.SyntaxTree, text, startPosition)
513Return New VirtualTreePoint(methodBlock.SyntaxTree, text, startPosition)
549Return New VirtualTreePoint(declareStatement.SyntaxTree, text, startPosition)
578Return New VirtualTreePoint(declareStatement.SyntaxTree, text, endPosition)
614Return New VirtualTreePoint(methodStatement.SyntaxTree, text, startPosition)
669Return New VirtualTreePoint(methodBlock.SyntaxTree, text, startPosition)
698Return New VirtualTreePoint(methodStatement.SyntaxTree, text, endPosition)
737Return New VirtualTreePoint(propertyStatement.SyntaxTree, text, startPosition)
782Return New VirtualTreePoint(propertyStatement.SyntaxTree, text, startPosition)
822Return New VirtualTreePoint(eventBlock.SyntaxTree, text, startPosition)
859Return New VirtualTreePoint(eventStatement.SyntaxTree, text, startPosition)
904Return New VirtualTreePoint(eventStatement.SyntaxTree, text, startPosition)
940Return New VirtualTreePoint(delegateStatement.SyntaxTree, text, startPosition)
969Return New VirtualTreePoint(delegateStatement.SyntaxTree, text, endPosition)
1035Return New VirtualTreePoint(namespaceBlock.SyntaxTree, text, startPosition)
1066Return New VirtualTreePoint(namespaceBlock.SyntaxTree, text, endPosition)
1098Return New VirtualTreePoint(variable.SyntaxTree, text, startPosition)
1123Return New VirtualTreePoint(enumMember.SyntaxTree, text, startPosition)
1150Return New VirtualTreePoint(variable.SyntaxTree, text, endPosition)
1174Return New VirtualTreePoint(enumMember.SyntaxTree, text, endPosition)
1204Return New VirtualTreePoint(parameter.SyntaxTree, text, startPosition)
1228Return New VirtualTreePoint(parameter.SyntaxTree, text, endPosition)
1254Return New VirtualTreePoint(importsStatement.SyntaxTree, text, startPosition)
1280Return New VirtualTreePoint(importsStatement.SyntaxTree, text, endPosition)
1306Return New VirtualTreePoint(optionStatement.SyntaxTree, text, startPosition)
1332Return New VirtualTreePoint(optionStatement.SyntaxTree, text, endPosition)
1358Return New VirtualTreePoint(inheritsStatement.SyntaxTree, text, startPosition)
1384Return New VirtualTreePoint(inheritsStatement.SyntaxTree, text, endPosition)
1410Return New VirtualTreePoint(implementsStatement.SyntaxTree, text, startPosition)
1436Return New VirtualTreePoint(implementsStatement.SyntaxTree, text, endPosition)
1465Return New VirtualTreePoint(attribute.SyntaxTree, text, startPosition)
1493Return New VirtualTreePoint(attribute.SyntaxTree, text, endPosition)
1528Return New VirtualTreePoint(argument.SyntaxTree, text, startPosition)
1562Return New VirtualTreePoint(argument.SyntaxTree, text, endPosition)
System.Private.CoreLib.Generators (2)
System.Text.RegularExpressions.Generator (2)
System.Windows.Forms.PrivateSourceGenerators (1)