Skip to content

cezarypiatek/SmartCodeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

316 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a completely refactored version of CodeGeneration.Roslyn

How to create a custom plugin

  1. Create .NET Core 3.0+ project
  2. Install SmartCodeGenerator.Sdk NuGet package
  3. Define the attribute that will be used for marking places that trigger your code generation plugin
  4. Create a class that implements SmartCodeGenerator.Sdk.ICodeGenerator and it's marked with [CodeGenerator()] attribute.
  5. Build your project and publish the NuGet package.

How to use a custom plugin

  1. Install SmartCodeGenerator.Engine NuGet package
  2. Install the package with your plugin
  3. Add source code of the marking attribute into your codebase
  4. Since now you can start marking code with your attribute and after recompilation, the generated code should be available at your disposal.

IMPORTANT: The source code of the marking attribute need to be copied into a consuming project because there should be no runtime dependency between the project that uses the generator plugin and the generator plugin itself.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages