Skip to content

loic-sharma/InterfaceGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interface Generator

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);
}

About

Automatically generate interfaces for your classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages