作者: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...
日期: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...