生成的代码 - 域类的代码,因为它可能是由工具生成的

时间:2012-03-31 17:59:11

标签: c# dns

我见过几个使用外部工具创建domainObject的示例项目。在代码中,它写在一个区域:

  

生成的代码 - 域类的代码,因为它可能是由工具生成的

我对这个工具感兴趣,如果这可以节省很多时间,我会用它!可能是哪个工具?我在PRISM样本中看到了这一点。

1 个答案:

答案 0 :(得分:0)

Visual Studio通常将注释放在它生成的代码文件的顶部。例如,添加Linq to SQL映射将生成带有标题

的* .designer.cs
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.235
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>

当依赖项发生更改时(例如在linq中添加新表到sql映射),这些文件将被重新生成。