Documentation | Getting Started | Supported Platforms | Need Help?
Pros: Easy to use, very quick to implement
Cons: Attributes are part of the build, annotations assembly has to be published and loaded
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 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
Download KY.Generator.exe from Releases
Run a command
KY.Generator.exe reflection -assembly=KY.Generator.Examples.Reflection.dll -name=ExampleType -namespace=KY.Generator.Examples.Reflection -relativePath=Output -language=TypeScript
See documentation for more details
For complete overview see our documentation