Skip to content

Repository files navigation

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

About

Fluent AsInterface() method C# source generator.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages