ahjesus 创建msdn一样的帮助文档
使用SandCastle创建.Net帮助文档
Sandcastle是微软提供的一个根据XML注释和DLL文件生成帮助文件的工具,目前是在CodePlex上的一个开源项目,可以去这里下载:Sandcatle 项目
Sandcastle 本身是一个console的程序,为了方便使用,我们可以使用他的GUI版本:Sandcastle Help File Builder
第一步,为你写的代码添加XML注释
我们创建一个简单的ClassLibrary1项目最为示范:
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassLibrary1
{
/// <summary>
/// A sample class to show something using Sandcastle
/// </summary>
public class SampleClass
{
private string _propertyValue; /// <summary>
/// Gets or sets the property value.
/// </summary>
/// <value>The property value.</value>
public string Property
{
get
{
return _propertyValue;
}
set
{
_propertyValue = value;
}
} /// <summary>
/// Determines whether the property is null.
/// </summary>
/// <returns>
/// <c>true</c> if property is null; otherwise, <c>false</c>.
/// </returns>
public bool IsPropertyNull()
{
bool result = false;
if (this.Property == null)
{
result = true;
}
return result;
} /// <summary>
/// Determines whether the property is null.
/// </summary>
/// <returns>
/// <c>true</c> if property is empty; otherwise, <c>false</c>.
/// </returns>
/// <example>
/// This example shows how you might use this method:
///
/// <code>
/// SampleClass sample = new SampleClass();
///
/// if (sample.IsPropertyEmpty())
/// {
/// Console.WriteLine("The property is empty");
/// }
/// else
/// {
/// Console.WriteLine("The property contains value " + sample.Property);
/// }
/// </code>
/// </example>
public bool IsPropertyEmpty()
{
bool result = this.IsPropertyNull();
if (!result)
{
result = (Property.Trim().Length == );
}
return result;
}
}
}
代码很简单,注意其中的XML注释。
打开项目的属性,在“Build”选项中,确保“XML documentation file:”被选中了。
![]()
第二步,编译这个项目,你会看到生成的DLL文件和XMl文件:
![]()
第三步,打开 Sandcastle Help File Builder
打开Sandcastle Help File Builder并新建一个项目:
![]()
为Sandcastle Help File Builder项目添加编译生成的DLL文件,右键点击项目右边的“Documentation Sources",选择“Add Documentation Source...”
![]()
选择刚刚生成的DLL文件。
![]()
第四步,修改设置
在项目的属性窗口,你可以根据需要修改一些设置。
![]()
第五步,生成文档
![]()
点击Build the help file来生成文档。
这是最终生成的文档:
![]()
ahjesus 创建msdn一样的帮助文档的更多相关文章
- Mongodb 笔记02 创建、更新和删除文档
创建.更新和删除文档 1. 插入并保存: 1). 单条插入,insert : db.foo.insert({"bar":"baz"}) 2). ...
- 使用docx4j编程式地创建复杂的Word(.docx)文档
原文链接:Create complex Word (.docx) documents programatically with docx4j 原文作者:jos.dirksen 发表日期:2012年2月 ...
- elasticsearch _create api创建一个不存在的文档
https://www.elastic.co/guide/cn/elasticsearch/guide/current/create-doc.html当我们索引一个文档, 怎么确认我们正在创建一个完全 ...
- 创建 VuePress + GithubPages + TravisCI 在线文档
目录 最终效果 思路 总体 过程 用到的东西 相关 创建Github仓库 创建Github仓库 SSH密钥链接Github 生成SSH密钥 Github添加SSH密钥 测试SSH密钥 配置VuePre ...
- 创建Sphinx + GitHub + ReadtheDocs托管文档
最新博客链接 "Tsanfer's Blog" 创建Sphinx + GitHub + ReadtheDocs托管文档 Readthedocs在线电子书链接
- MongoDb 创建、更新以及删除文档常用命令
mongodb由C++写就,其名字来自humongous这个单词的中间部分,从名字可见其野心所在就是海量数据的处理.关于它的一个最简洁描述为:scalable, high-performance, o ...
- MongoDB学习笔记二:创建、更新及删除文档
插入并保存文档 对目标集使用insert方法插入一个文档: > db.foo.insert({"bar" : "baz"}) 这个操作会给文档增加一个&q ...
- MongoDB学习笔记-创建、更新、删除文档
创建 MongoDB中使用insert方法来向集合插入文档,然后保存到MongoDB中. db.foo.insert({"hehe":"呵呵"} ...
- 创建、更新、删除文档。 --- Mongodb权威指南阅读。
插入文档: db.foo.insert({ "key" : "value"}); 使用insert插入一个数据,文档中如果没有_id 会自动给文档增加_id. ...
随机推荐
- 关于php的mysqlnd驱动
1.什么是mysqlnd驱动? PHP手册上的描述: MySQL Native Driver is a replacement for the MySQL Client Library (libmys ...
- Workday为何迟迟不进入中国
全球知名HRM SaaS厂商Workday在世界各地攻城拔寨,俨然是HR SaaS的代名词,更是HRM市场的领导品牌.但是却单单在中国市场悄无声息,除了为数不多的海尔海外.联想海外等规模客户和部分ro ...
- 用Wireshark简单分析HTTP通信
我们都学过TCP,HTTP的相关概念,本文借助协议分析工具Wireshark,让大家对一些概念眼见为实,权当温故而知新. 场景: 在Client(10.239.196.211)上通过web brows ...
- tcp为什么需要3次握手4次挥手
一.起因 在网络请求中,为了提升性能,通常会采用长连接的方式避免在每一次交互都进行网络链接的创建和关闭,而长连接就是tpc的链接方式.因而有必要对tcp的创建链接和关闭有所了解.在网络上查询了一些知识 ...
- Color Me Less
Color Me Less Time Limit: 2 Seconds Memory Limit: 65536 KB Problem A color reduction is a mappi ...
- FLEX自定义事件
有时候我们需要让两个组件之间实现联动,并且在其中传递数据,自定义事件机制可以帮助我们比较优雅的实现这种需要. 下面的例子,是打算实现一个列表和一个编辑框的联动. 编辑框代码 <?xml vers ...
- 转载:Linux kernel rt_mutex的背景和简介
From: http://blog.chinaunix.net/uid-23146151-id-3074045.html 最近在看linux rtmutex部分的实现过程,就像他注释中写的一样,还是比 ...
- 哇塞,原来自己写 Google Chrome 浏览器扩展(插件)这么容易!
1. 首先新建一个记事本,命名为 manifest.json,这是写 Google Chrome 浏览器扩展必须的文件 { "manifest_version": 2, " ...
- Linux下grep显示前后几行信息
Linux下grep显示前后几行信息 标准unix/linux下的grep通过下面參数控制上下文 grep -C 5 foo file 显示file文件里匹配foo字串那行以及上下5行grep -B ...
- Understanding apps: mobile, native or responsive
Background Maybe you have decided to get an app built. You will not build it yourself (obviously!) s ...