Documentation | Getting Started | Supported Platforms | Need Help?
Pros: Easy to use, rapid to implement
Cons: Attributes are part of the build, annotation assemblies have to be published and loaded when reflection is used
Install nuget package KY.Generator
Decorate a class with one of our Generate attributes
using KY.Generator;
...
[Generate("Output")]
internal class TypeToRead
{
public string Property { get; set; }
}
See the complete showcase
See documentation for more details
Pros: generator code is completely separated and is not published, more actions are available than via annotations
Cons: the initial setup is not so easy as with annotations
Create a new class library project
Install nuget package KY.Generator.Fluent
Derive a class from GeneratorFluentMain, override the execute method and use the Read method
public class GeneratorMain : GeneratorFluentMain
{
public override void Execute()
{
this.Read()
.FromType<Types>()
.Write()
.AngularModels().OutputPath("Output/Models").SkipHeader()
.AngularServices().OutputPath("Output/Services").SkipHeader();
}
}
See the complete showcase
See documentation for more details
dotnet tool install -g KY.Generator.CLI
Run a command
ky-generator reflection -assembly=KY.Generator.Examples.Reflection.dll -name=ExampleType -namespace=KY.Generator.Examples.Reflection -relativePath=Output -language=TypeScript
The tool ships every built-in module, so nothing has to be installed next to it. It requires the .NET 8, 9 or 10 runtime; an assembly built for one of those is read by a matching process, whichever of them the tool itself was started on.
See documentation for more details
For a complete overview see our documentation