C# Source Generator which generates fluent AsInterface cast-methods for all interfaces type implements.
Manually written source:
public interface IPrintable
{
}
[BeaKona.GenerateAutoAs]
public partial class Person : IPrintable
{
}
Auto-generated accompanying source:
partial class Person
{
public IPrintable AsPrintable() => this;
}
Other examples can be found in wiki.
---