Skip to content

Add a way for code generators to replace a file. #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
orellabac opened this issue Apr 26, 2019 · 1 comment
Open

Add a way for code generators to replace a file. #107

orellabac opened this issue Apr 26, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@orellabac
Copy link

Currently the Context only has methods to add a new compilation unit but in my case I want a generator that will completely replace the contents of the original file. How can I do that?

@carldebilly
Copy link
Member

Current the best way to achieve that is to use partial classes and/or create code which are only used by the generator, not the compiled app.

For now, it can only add new code and there's many ways to use that even with such limitation.

@carldebilly carldebilly added the enhancement New feature or request label Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants