{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
AJAX Source Viewer
View the source code of a Method from ASP.NET AJAX Library. Choose a method from the menu items above (Namespaces, Classes, or Methods).
Method 'prototype.registerEnum(name, flags)'
Method: prototype.registerEnum(name, flags)
Method Full Name:     Type$registerEnum(name, flags)
Class: Type
Namespace: Global (MicrosoftAjax.debug.js)
Source File: MicrosoftAjax.debug.js
1   Type.prototype.registerEnum = function Type$registerEnum(name, flags) {
2     /// <summary locid="M:J#Sys.UI.LineType.#ctor" />
3     /// <param name="name" type="String"></param>
4     /// <param name="flags" type="Boolean" optional="true"></param>
5     var e = Function._validateParams(arguments, [
6     {name: "name", type: String},
7     {name: "flags", type: Boolean, optional: true}
8     ]);
9     if (e) throw e;
10    if (!Type.__fullyQualifiedIdentifierRegExp.test(name)) throw Error.argument('name', Sys.Res.notATypeName);
11    var parsedName;
12    try {
13      parsedName = eval(name);
14    }
15    catch(e) {
16      throw Error.argument('name', Sys.Res.argumentTypeName);
17    }
18    if (parsedName !== this) throw Error.argument('name', Sys.Res.badTypeName);
19    if (Sys.__registeredTypes[name]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, name));
20    for (var i in this.prototype) {
21      var val = this.prototype[i];
22      if (!Type.__identifierRegExp.test(i)) throw Error.invalidOperation(String.format(Sys.Res.enumInvalidValueName, i));
23      if (typeof(val) !== 'number' || (val % 1) !== 0) throw Error.invalidOperation(Sys.Res.enumValueNotInteger);
24      if (typeof(this[i]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.enumReservedName, i));
25    }
26    Sys.__upperCaseTypes[name.toUpperCase()] = this;
27    for (var i in this.prototype) {
28      this[i] = this.prototype[i];
29    }
30    this.__typeName = name;
31    this.parse = Sys$Enum$parse;
32    this.__string = this.toString();
33    this.toString = Sys$Enum$toString;
34    this.__flags = flags;
35    this.__enum = true;
36    Sys.__registeredTypes[name] = true;
37  }
This is the JavaScript source for method prototype.registerEnum(name, flags) from ASP.NET AJAX Library. Full name for this method is Type$registerEnum(name, flags). It belongs to the class Type, which is in Global (MicrosoftAjax.debug.js) namespace. This source is in MicrosoftAjax.debug.js file.
Bookmark and Share This
About  Contact  Privacy Policy  Site Map