18 references to TestSyntaxReceiver
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
SourceGeneration\SyntaxAwareGeneratorTests.cs (18)
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)), 419onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is AssignmentExpressionSyntax) throw exception; })), 459TestSyntaxReceiver receiver1 = new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is PropertyDeclarationSyntax) throw new Exception("Test Exception"); }); 465TestSyntaxReceiver receiver2 = new TestSyntaxReceiver(tag: 1); 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; }, 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"); } })),