1 write to Node
Microsoft.CodeAnalysis (1)
SourceGeneration\GeneratorContexts.cs (1)
235Node = node;
52 references to Node
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Parser\BinderInvocation.cs (2)
25Debug.Assert(IsCandidateSyntaxNode(context.Node)); 26InvocationExpressionSyntax invocationSyntax = (InvocationExpressionSyntax)context.Node;
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
RequestDelegateGenerator.cs (1)
26var operation = context.SemanticModel.GetOperation(context.Node, token);
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
38var attributeSyntax = (AttributeSyntax)context.Node; 147var memberAccessExpressionSyntax = (MemberAccessExpressionSyntax)context.Node;
HubServerProxyGenerator.Parser.cs (2)
38var attributeSyntax = (AttributeSyntax)context.Node; 137var memberAccessExpressionSyntax = (MemberAccessExpressionSyntax)context.Node;
Microsoft.CodeAnalysis (2)
SourceGeneration\GeneratorContexts.cs (1)
246/// The <see cref="CodeAnalysis.SemanticModel" /> that can be queried to obtain information about <see cref="Node"/>.
SourceGeneration\SyntaxContextReceiverAdaptor.cs (1)
21public void OnVisitSyntaxNode(GeneratorSyntaxContext context) => Receiver.OnVisitSyntaxNode(context.Node);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
SourceGeneration\GeneratorDriverTests.cs (11)
2118static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)") 2180static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)") 2277static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)") 2393var input = ctx.SyntaxProvider.CreateSyntaxProvider(static (n, _) => n is ClassDeclarationSyntax, (gsc, _) => (ClassDeclarationSyntax)gsc.Node) 2597var classDeclarationSyntax = (ClassDeclarationSyntax)context.Node; 3151ctx.RegisterSourceOutput(ctx.SyntaxProvider.CreateSyntaxProvider((node, ct) => node is ClassDeclarationSyntax c, (context, ct) => context.Node).WithTrackingName("Syntax"), (context, ct) => { }); 3285ctx.RegisterSourceOutput(ctx.SyntaxProvider.CreateSyntaxProvider((node, ct) => node is ClassDeclarationSyntax c, (context, ct) => context.Node).WithTrackingName("Syntax"), (context, ct) => { }); 4014var syntax = ctx.SyntaxProvider.CreateSyntaxProvider((s, _) => true, (s, _) => s.Node); 4031var syntax = ctx.SyntaxProvider.CreateSyntaxProvider((s, _) => true, (s, _) => s.Node); 4055static (gsc, _) => gsc.Node) 4205var locationSpecifier = model.GetInterceptableLocation((InvocationExpressionSyntax)context.Node, token);
SourceGeneration\SyntaxAwareGeneratorTests.cs (23)
293Assert.IsType<CompilationUnitSyntax>(testReceiver.VisitedNodes[0].Node); 295Assert.Equal(testReceiver.VisitedNodes[0].SemanticModel.SyntaxTree, testReceiver.VisitedNodes[0].Node.SyntaxTree); 786if (ctx.Node is ClassDeclarationSyntax cds 857var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 897var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 903var source2 = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is ClassDeclarationSyntax fds, (c, _) => ((ClassDeclarationSyntax)c.Node).Identifier.ValueText); 948}, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1016var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1091var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1172var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1180var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1223var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1306var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1393(c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Syntax") 1515var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1574syntaxCalledFor.Add(((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1575return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1625syntaxCalledFor.Add(((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1626return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1682return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1741return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1794return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1858ctx.RegisterSourceOutput(ctx.SyntaxProvider.CreateSyntaxProvider((s, _) => { if (s is AssignmentExpressionSyntax) throw exception; return true; }, (c, _) => c.Node), (spc, s) => { });
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
107var attributeSyntax = (AttributeSyntax)context.Node;
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
107var attributeSyntax = (AttributeSyntax)context.Node;
Microsoft.Gen.Logging (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
107var attributeSyntax = (AttributeSyntax)context.Node;
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
107var attributeSyntax = (AttributeSyntax)context.Node;
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
107var attributeSyntax = (AttributeSyntax)context.Node;
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Roslyn3.11.cs (2)
101if (IsSyntaxTargetForGeneration(context.Node)) 115var classDeclarationSyntax = (ClassDeclarationSyntax)context.Node;
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
79transform: static (generatorSyntaxContext, _) => GetUserProjectNamespace(generatorSyntaxContext.Node));
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
69var invocationExpression = (InvocationExpressionSyntax)context.Node;