Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 776 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 776 Bytes

AutoAs

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.


---

.NET Core NuGet