public void Execute(GeneratorExecutionContext context) { context.AddCode("foo.cs", @" namespace MyTemplate { public class Foo { } }"); if (context.SyntaxReceiver is not SyntaxReceiver receiver) { return; } }