Reputation:
Many of the features in visual studio rely on editing a markup file and then saving it to auto-generate POC in C#.
For example, editing and saving a database *.dbml
file will generate a *.designer.cs
file that you can call from POC. It's also seen with ASP.Net *.aspx
files, generating an *.aspx.designer.cs
upon save so that the controls can be accessed in the codebehind files.
Is it possible to leverage this functionality in my own software so that I can define my own text files in CSV, JSON, or XML format and specify rules for generating code upon saving the file?
Upvotes: 1
Views: 133
Reputation: 39329
The Visual Studio feature to generate code is called T4 Templating.
Upvotes: 2