[英]Visual Studio: Create Add-In That Creates Partial Class in C#
I'd like to have an Add-In in Visual Studio 2008 that will auto-generate some code as a partial class in C# for an existing class but I don't know where to start.我想在 Visual Studio 2008 中有一个加载项,它将自动生成一些代码作为 C# 中的部分 class 用于现有的 class,但我不知道从哪里开始。
Any ideas or best practices would be greatly appreciated.任何想法或最佳实践将不胜感激。
thanks谢谢
What exactly do you want your addin to do with the existing class to generate this?你到底想让你的插件与现有的 class 做什么来生成这个?
You can do similar things using the Text Template Transformation Toolkit (T4)您可以使用文本模板转换工具包 (T4)执行类似的操作
You can create an item template to accomplish this.您可以创建一个项目模板来完成此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.