32 references to RegisterForSyntaxNotifications
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
SourceGeneration\SyntaxAwareGeneratorTests.cs (20)
41onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()), 144onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()), 187init.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()); 190init.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()); 206init.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()); 211init.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()); 242onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()), 323onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(++invocations)), 377onInit: (i) => i.RegisterForSyntaxNotifications((SyntaxReceiverCreator)(() => throw exception)), 419onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is AssignmentExpressionSyntax) throw exception; })), 461onInit: (i) => i.RegisterForSyntaxNotifications(() => receiver1), 467onInit: (i) => i.RegisterForSyntaxNotifications(() => receiver2), 503onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is AssignmentExpressionSyntax) throw exception; })), 509onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 1)), 558onInit: (i) => { i.RegisterForSyntaxNotifications(() => receiver = new TestSyntaxReceiver()); throw exception; }, 589onInit: (i) => i.RegisterForSyntaxNotifications((SyntaxReceiverCreator)(() => null!)), 628i.RegisterForSyntaxNotifications(() => receiver = new TestSyntaxReceiver()); 682i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()); 737onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver()), 2051onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is AssignmentExpressionSyntax) { throw new OperationCanceledException("Simulated cancellation from external source"); } })),
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
47context.RegisterForSyntaxNotifications(TypeDeclarationSyntaxReceiver.Create);
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.MetadataExtractor (3)
MetadataReportsGenerator.cs (1)
50context.RegisterForSyntaxNotifications(TypeDeclarationSyntaxReceiver.Create);
src\Generators\Microsoft.Gen.ComplianceReports\ComplianceReportsGenerator.cs (1)
47context.RegisterForSyntaxNotifications(TypeDeclarationSyntaxReceiver.Create);
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
34context.RegisterForSyntaxNotifications(ClassDeclarationSyntaxReceiver.Create);
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);
Microsoft.Gen.MetricsReports (1)
MetricsReportsGenerator.cs (1)
34context.RegisterForSyntaxNotifications(ClassDeclarationSyntaxReceiver.Create);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
349context.RegisterForSyntaxNotifications(() => _receiver);