日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > asp.net >内容正文

asp.net

Sandcastle是微软提供的一个根据XML注释和DLL文件生成帮助文件的工具

發布時間:2025/1/21 asp.net 101 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Sandcastle是微软提供的一个根据XML注释和DLL文件生成帮助文件的工具 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2019獨角獸企業重金招聘Python工程師標準>>>

????? 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 == 0);} return result;}}}

代碼很簡單,注意其中的XML注釋。

打開項目的屬性,在“Build”選項中,確保“XML documentation file:”被選中了。

第二步,編譯這個項目,你會看到生成的DLL文件和XMl文件:

第三步,打開 Sandcastle Help File Builder

第四步,修改設置

在項目的屬性窗口,你可以根據需要修改一些設置。

第五步,生成文檔




轉載于:https://my.oschina.net/lichaoqiang/blog/492307

總結

以上是生活随笔為你收集整理的Sandcastle是微软提供的一个根据XML注释和DLL文件生成帮助文件的工具的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。