Use inline XML comments, and generate online documentation off them programmatically with SandCastle. It's not "self-documenting", but it's about as low-friction as you can get for creating documentation.
You can enforce this (and other good stuff) using StyleCop. If you're using Resharper, you can even enforce this in realtime with the StyleCop for Resharper plugin.
发布评论
评论(2)
使用内联 XML 注释,并使用 SandCastle 以编程方式生成在线文档。它不是“自我记录”,但它是创建文档时尽可能低的摩擦。
您可以使用 StyleCop 强制执行此操作(以及其他好东西)。如果您使用 Resharper,您甚至可以使用 StyleCop for Resharper 插件实时强制执行此操作。
Use inline XML comments, and generate online documentation off them programmatically with SandCastle. It's not "self-documenting", but it's about as low-friction as you can get for creating documentation.
You can enforce this (and other good stuff) using StyleCop. If you're using Resharper, you can even enforce this in realtime with the StyleCop for Resharper plugin.
至于结构,请遵循开发类库的设计指南
As for structure, follow the Design Guidelines for Developing Class Libraries