惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
G
Google Developers Blog
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
MyScale Blog
MyScale Blog
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
爱范儿
爱范儿
罗磊的独立博客
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
C
Check Point Blog
美团技术团队
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - Truly

找不到具有绑定 MetadataExchangeHttpBinding 的终结点的与方案 http 匹配的基址。注册的基址方案是 [https] 生成8位的不重复乱码 省地市级联选择js 使用SandCastle和ScriptDoc创建JavaScript文档 关于.NET的异常处理的几个误区 JavaScript实现自定义事件 JavaScript面向对象之属性实现 JavaScript随笔一篇 - Truly - 博客园 设计模式在JavaScript中的应用(2) -- Observer 关于JavaScript的“+”运算和“-”运算和三目操作符“?:” - Truly - 博客园 微软ASP.NET AJAX中日期类型的JSON处理 JavaScript面向对象之方法重载 谁动了我的奶酪? 设计模式在JavaScript中的应用(1) 在JavaScript中使用面向对象 对于Asp.Net 2.0中脚本资源的研究(2) 对于Asp.Net 2.0中脚本资源的研究(1) js功能类库放送(二) 调整大小库 js功能类库放送(一) 拖动功能库
继续完善SandCastle
Truly · 2007-08-09 · via 博客园 - Truly

作者:Truly
日期:2007.8.8

今天抽空继续调整了SandCastle的部分代码,现在可以初步看到一些jscript格式的说明文档了,不过还是不很完美,由于没有SandCastle的源码,极大的影响了调试修改的过程。下面是生成的文档的一个抓图,大家可以通过点击这里查看我生成的文档。


// Bootstrapping the Sys namespace. Can't use registerNamespace here as its code uses some of the private
//
 variables that moved from the global namespace onto Sys.
//
 Changes to registerNamespace should be checked against this bootstrapping code to keep them in sync.
window.Sys = {
    __namespace: 
true,
    __typeName: 
"Sys",
    getName: 
function() {return "Sys";},
    __upperCaseTypes: {}
};
Sys.__rootNamespaces 
= [Sys];
Sys.__registeredTypes 
= {};

Sys.IDisposable 

= function Sys$IDisposable() {
    
throw Error.notImplemented();
}
function Sys$IDisposable$dispose() {
        
throw Error.notImplemented();
    }
Sys.IDisposable.prototype 
= {
    dispose: Sys$IDisposable$dispose
}
Sys.IDisposable.registerInterface('Sys.IDisposable');
Sys.StringBuilder 
= function Sys$StringBuilder(initialText) {
    
/// <summary locid="M:Sys.StringBuilder.#ctor" />
    /// <param name="initialText" optional="true" mayBeNull="true" locid="Param:Sys.StringBuilder.#ctor.initialText"></param>
    var e = Function._validateParams(arguments, [
        {name: 
"initialText", mayBeNull: true, optional: true}
    ]);
    
if (e) throw e;
    
this._parts = (typeof(initialText) !== 'undefined' && initialText !== null && initialText !== '') ?
        [initialText.toString()] : [];
    
this._value = {};
    
this._len = 0;
}

上面是Sys的部分代码,看一下生成的文档:

抓图3:

说明:今天继续修改SandCastle组件并调整了生成的配置,最终获得了上面的js文档。

通过SandCastle我们可以生成JavaScript和.NET代码的注释文档,风格有好几种,而且现在的CTP版本已经增强了很多自定义的功能。

本文仍然是以MicrosoftAjax.js为文档,对于自己编写的js也可以利用ScriptDoc和SandCastle来生成文档。

today's update(August 9, 2007): fixed the format of class and method,etc. and added a JavaScriptDeclarationSyntaxGenerator class into the SyntaxComponents, then you can set sandcastle.config to generate a javascript document using this template.

here's some shots:

Now its format is very close the MS script reference.

to be continue...