18 instantiations of 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"); } })),
20 references to TestSyntaxReceiver
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
SourceGeneration\SyntaxAwareGeneratorTests.cs (20)
49Assert.IsType<TestSyntaxReceiver>(receiver); 250Assert.IsType<TestSyntaxReceiver>(receiver); 252TestSyntaxReceiver testReceiver = (TestSyntaxReceiver)receiver!; 331Assert.IsType<TestSyntaxReceiver>(receiver); 333TestSyntaxReceiver testReceiver = (TestSyntaxReceiver)receiver!; 348testReceiver = (TestSyntaxReceiver)receiver!; 459TestSyntaxReceiver receiver1 = new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is PropertyDeclarationSyntax) throw new Exception("Test Exception"); }); 465TestSyntaxReceiver receiver2 = new TestSyntaxReceiver(tag: 1); 527var testReceiver = (TestSyntaxReceiver)receiver!; 555TestSyntaxReceiver? receiver = null; 623TestSyntaxReceiver? receiver = null; 692Assert.IsType<TestSyntaxReceiver>(receiver); 694TestSyntaxReceiver testReceiver = (TestSyntaxReceiver)receiver!; 750Assert.IsType<TestSyntaxReceiver>(receiver); 752TestSyntaxReceiver testReceiver = (TestSyntaxReceiver)receiver!;