📄 microsoftajax.debug.js
字号:
if ((arguments.length > 1) && (typeof(baseType) === 'undefined')) throw Error.argumentUndefined('baseType');
if (baseType && !baseType.__class) throw Error.argument('baseType', Sys.Res.baseNotAClass);
this.prototype.constructor = this;
this.__typeName = typeName;
this.__class = true;
if (baseType) {
this.__baseType = baseType;
this.__basePrototypePending = true;
}
Sys.__upperCaseTypes[typeName.toUpperCase()] = this;
if (interfaceTypes) {
this.__interfaces = [];
this.resolveInheritance();
for (var i = 2, l = arguments.length; i < l; i++) {
var interfaceType = arguments[i];
if (!interfaceType.__interface) throw Error.argument('interfaceTypes[' + (i - 2) + ']', Sys.Res.notAnInterface);
for (var methodName in interfaceType.prototype) {
var method = interfaceType.prototype[methodName];
if (!this.prototype[methodName]) {
this.prototype[methodName] = method;
}
}
this.__interfaces.push(interfaceType);
}
}
Sys.__registeredTypes[typeName] = true;
return this;
}
Type.prototype.registerInterface = function Type$registerInterface(typeName) {
/// <summary locid="M:J#Type.registerInterface" />
/// <param name="typeName" type="String"></param>
/// <returns type="Type"></returns>
var e = Function._validateParams(arguments, [
{name: "typeName", type: String}
]);
if (e) throw e;
if (!Type.__fullyQualifiedIdentifierRegExp.test(typeName)) throw Error.argument('typeName', Sys.Res.notATypeName);
var parsedName;
try {
parsedName = eval(typeName);
}
catch(e) {
throw Error.argument('typeName', Sys.Res.argumentTypeName);
}
if (parsedName !== this) throw Error.argument('typeName', Sys.Res.badTypeName);
if (Sys.__registeredTypes[typeName]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, typeName));
Sys.__upperCaseTypes[typeName.toUpperCase()] = this;
this.prototype.constructor = this;
this.__typeName = typeName;
this.__interface = true;
Sys.__registeredTypes[typeName] = true;
return this;
}
Type.prototype.resolveInheritance = function Type$resolveInheritance() {
/// <summary locid="M:J#Type.resolveInheritance" />
if (arguments.length !== 0) throw Error.parameterCount();
if (this.__basePrototypePending) {
var baseType = this.__baseType;
baseType.resolveInheritance();
for (var memberName in baseType.prototype) {
var memberValue = baseType.prototype[memberName];
if (!this.prototype[memberName]) {
this.prototype[memberName] = memberValue;
}
}
delete this.__basePrototypePending;
}
}
Type.getRootNamespaces = function Type$getRootNamespaces() {
/// <summary locid="M:J#Type.getRootNamespaces" />
/// <returns type="Array"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return Array.clone(Sys.__rootNamespaces);
}
Type.isClass = function Type$isClass(type) {
/// <summary locid="M:J#Type.isClass" />
/// <param name="type" mayBeNull="true"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "type", mayBeNull: true}
]);
if (e) throw e;
if ((typeof(type) === 'undefined') || (type === null)) return false;
return !!type.__class;
}
Type.isInterface = function Type$isInterface(type) {
/// <summary locid="M:J#Type.isInterface" />
/// <param name="type" mayBeNull="true"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "type", mayBeNull: true}
]);
if (e) throw e;
if ((typeof(type) === 'undefined') || (type === null)) return false;
return !!type.__interface;
}
Type.isNamespace = function Type$isNamespace(object) {
/// <summary locid="M:J#Type.isNamespace" />
/// <param name="object" mayBeNull="true"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "object", mayBeNull: true}
]);
if (e) throw e;
if ((typeof(object) === 'undefined') || (object === null)) return false;
return !!object.__namespace;
}
Type.parse = function Type$parse(typeName, ns) {
/// <summary locid="M:J#Type.parse" />
/// <param name="typeName" type="String" mayBeNull="true"></param>
/// <param name="ns" optional="true" mayBeNull="true"></param>
/// <returns type="Type" mayBeNull="true"></returns>
var e = Function._validateParams(arguments, [
{name: "typeName", type: String, mayBeNull: true},
{name: "ns", mayBeNull: true, optional: true}
]);
if (e) throw e;
var fn;
if (ns) {
fn = Sys.__upperCaseTypes[ns.getName().toUpperCase() + '.' + typeName.toUpperCase()];
return fn || null;
}
if (!typeName) return null;
if (!Type.__htClasses) {
Type.__htClasses = {};
}
fn = Type.__htClasses[typeName];
if (!fn) {
fn = eval(typeName);
if (typeof(fn) !== 'function') throw Error.argument('typeName', Sys.Res.notATypeName);
Type.__htClasses[typeName] = fn;
}
return fn;
}
Type.registerNamespace = function Type$registerNamespace(namespacePath) {
/// <summary locid="M:J#Type.registerNamespace" />
/// <param name="namespacePath" type="String"></param>
var e = Function._validateParams(arguments, [
{name: "namespacePath", type: String}
]);
if (e) throw e;
if (!Type.__fullyQualifiedIdentifierRegExp.test(namespacePath)) throw Error.argument('namespacePath', Sys.Res.invalidNameSpace);
var rootObject = window;
var namespaceParts = namespacePath.split('.');
for (var i = 0; i < namespaceParts.length; i++) {
var currentPart = namespaceParts[i];
var ns = rootObject[currentPart];
if (ns && !ns.__namespace) {
throw Error.invalidOperation(String.format(Sys.Res.namespaceContainsObject, namespaceParts.splice(0, i + 1).join('.')));
}
if (!ns) {
ns = rootObject[currentPart] = {
__namespace: true,
__typeName: namespaceParts.slice(0, i + 1).join('.')
};
if (i === 0) {
Sys.__rootNamespaces[Sys.__rootNamespaces.length] = ns;
}
var parsedName;
try {
parsedName = eval(ns.__typeName);
}
catch(e) {
parsedName = null;
}
if (parsedName !== ns) {
delete rootObject[currentPart];
throw Error.argument('namespacePath', Sys.Res.invalidNameSpace);
}
ns.getName = function ns$getName() {return this.__typeName;}
}
rootObject = ns;
}
}
Type._checkDependency = function Type$_checkDependency(dependency) {
var scripts = Type._registerScript._scripts;
return (scripts ? (!!scripts[dependency]) : false);
}
Type._registerScript = function Type$_registerScript(scriptName, dependencies) {
var scripts = Type._registerScript._scripts;
if (!scripts) {
Type._registerScript._scripts = scripts = {};
}
if (scripts[scriptName]) {
throw Error.invalidOperation(String.format(Sys.Res.scriptAlreadyLoaded, scriptName));
}
scripts[scriptName] = true;
if (dependencies) {
for (var i = 0, l = dependencies.length; i < l; i++) {
var dependency = dependencies[i];
if (!Type._checkDependency(dependency)) {
throw Error.invalidOperation(String.format(Sys.Res.scriptDependencyNotFound, scriptName, dependency));
}
}
}
}
window.Sys = {
__namespace: true,
__typeName: "Sys",
getName: function() {return "Sys";},
__upperCaseTypes: {}
};
Sys.__rootNamespaces = [Sys];
Sys.__registeredTypes = {};
Type._registerScript._scripts = {
"MicrosoftAjaxCore.js": true,
"MicrosoftAjaxGlobalization.js": true,
"MicrosoftAjaxSerialization.js": true,
"MicrosoftAjaxComponentModel.js": true,
"MicrosoftAjaxHistory.js": true,
"MicrosoftAjaxNetwork.js" : true,
"MicrosoftAjaxWebServices.js": true,
"MicrosoftAjaxApplicationServices.js": true };
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:J#Sys.StringBuilder.#ctor" />
/// <param name="initialText" optional="true" mayBeNull="true"></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;
}
function Sys$StringBuilder$append(text) {
/// <summary locid="M:J#Sys.StringBuilder.append" />
/// <param name="text" mayBeNull="true"></param>
var e = Function._validateParams(arguments, [
{name: "text", mayBeNull: true}
]);
if (e) throw e;
this._parts[this._parts.length] = text;
}
function Sys$StringBuilder$appendLine(text) {
/// <summary locid="M:J#Sys.StringBuilder.appendLine" />
/// <param name="text" optional="true" mayBeNull="true"></param>
var e = Function._validateParams(arguments, [
{name: "text", mayBeNull: true, optional: true}
]);
if (e) throw e;
this._parts[this._parts.length] =
((typeof(text) === 'undefined') || (text === null) || (text === '')) ?
'\r\n' : text + '\r\n';
}
function Sys$StringBuilder$clear() {
/// <summary locid="M:J#Sys.StringBuilder.clear" />
if (arguments.length !== 0) throw Error.parameterCount();
this._parts = [];
this._value = {};
this._len = 0;
}
function Sys$StringBuilder$isEmpty() {
/// <summary locid="M:J#Sys.StringBuilder.isEmpty" />
/// <returns type="Boolean"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
if (this._parts.length === 0) return true;
return this.toString() === '';
}
function Sys$StringBuilder$toString(separator) {
/// <summary locid="M:J#Sys.StringBuilder.toString" />
/// <param name="separator" type="String" optional="true" mayBeNull="true"></param>
/// <returns type="String"></returns>
var e = Function._validateParams(arguments, [
{name: "separator", type: String, mayBeNull: true, optional: true}
]);
if (e) throw e;
separator = separator || '';
var parts = this._parts;
if (this._len !== parts.length) {
this._value = {};
this._len = parts.length;
}
var val = this._value;
if (typeof(val[separator]) === 'undefined') {
if (separator !== '') {
for (var i = 0; i < parts.length;) {
if ((typeof(parts[i]) === 'undefined') || (parts[i] === '') || (parts[i] === null)) {
parts.splice(i, 1);
}
else {
i++;
}
}
}
val[separator] = this._parts.join(separator);
}
return val[separator];
}
Sys.StringBuilder.prototype = {
append: Sys$StringBuilder$append,
appendLine: Sys$StringBuilder$appendLine,
clear: Sys$StringBuilder$clear,
isEmpty: Sys$StringBuilder$isEmpty,
toString: Sys$StringBuilder$toString
}
Sys.StringBuilder.registerClass('Sys.StringBuilder');
Sys.Browser = {};
Sys.Browser.InternetExplorer = {};
Sys.Browser.Firefox = {};
Sys.Browser.Safari = {};
Sys.Browser.Opera = {};
Sys.Browser.agent = null;
Sys.Browser.hasDebuggerStatement = false;
Sys.Browser.name = navigator.appName;
Sys.Browser.version = parseFloat(navigator.appVersion);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -