自定义 T4 生成器生成的类看起来很乱
运行生成器输出文件后,代码看起来确实很混乱。我知道我可能永远不会查看这些文件,但很高兴在开发生成器时看到生成的代码结构良好。
欢迎任何建议。
After running the generator output files with code look really disordered. I know I will probably never look into those files but it is nice to see generated code nicely structured while developing a generator.
Any suggestions are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只要代码有效,就 ,谁在乎呢。安息吧朋友,继续做更重要的事情:)
但是如果你真的想这样做,我建议在你的持续构建系统中添加一个代码重新格式化过程。请参阅如何强制代码样式格式化作为构建? 为例
as long as the code works, who cares. rest easy friend, move on to more important things :)
but if you REALLY want to do this, I'd suggest adding a code-reformatting process to your continuous build system. see How to force code style formatting as part of the build? for an example
更改您的 t4 代码以使输出代码更整洁...或者不看。
Change your t4 code to make the output code neater... or don't look.