This is an toy project that uses C# Source Generators to automatically generate the interface for a class. For example:
class Program
{
static void Main(string[] args)
{
IFoo x = new Foo();
x.Bar("test");
}
}
public class Foo : IFoo
{
public void Bar(string name)
{
Console.WriteLine($"Hello {name}");
}
}
The generator will automatically create IFoo
:
public interface IFoo
{
void Bar(string name);
}