Skip to content

How to start?

beakona edited this page Jul 28, 2021 · 4 revisions

AutoInterface is a .NET Standard 2.0 library that runs during compile-time.

Inside your .NET project:

  1. Install NuGet package BeaKona.AutoInterfaceGenerator or add BeaKona.AutoInterfaceGenerator.dll as Analyzer to your Visual Studio .csproj file.
<ItemGroup>
   <Analyzer Include="absolute-or-relative-path-to\BeaKona.AutoInterfaceGenerator.dll"/>
</ItemGroup>
  1. Mark class as partial.
  2. Append attribute BeaKona.AutoInterfaceAttribute to a backing member which will handle calls.

Additional links

Introducing C# source generators
Source Generators Cookbook

Clone this wiki locally