diff --git a/.gitignore b/.gitignore index 0ad3f4c..8da187f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# VS2015 hidden folder +.vs + bin obj *.suo diff --git a/Defs/Html/NuGet.nuspec b/Defs/Html/NuGet.nuspec index 2b9d4e4..7bb3a14 100644 --- a/Defs/Html/NuGet.nuspec +++ b/Defs/Html/NuGet.nuspec @@ -5,13 +5,13 @@ API library for Html5 - 5.4.7 + 5.4.8 Sharpkit Ltd Dan-el http://sharpkit.net/ false - + diff --git a/Defs/Html/generated/modules/vibration/NavigatorVibration.cs b/Defs/Html/generated/modules/vibration/NavigatorVibration.cs index 70aaee9..04b0a26 100644 --- a/Defs/Html/generated/modules/vibration/NavigatorVibration.cs +++ b/Defs/Html/generated/modules/vibration/NavigatorVibration.cs @@ -71,7 +71,7 @@ namespace SharpKit.Html.vibration public partial class Navigator { public void vibrate(int pattern) {} - public void vibrate(int time) {} + //public void vibrate(int time) {} } } \ No newline at end of file diff --git a/Defs/jQuery/NuGet.nuspec b/Defs/jQuery/NuGet.nuspec index 28048f6..44c40e9 100644 --- a/Defs/jQuery/NuGet.nuspec +++ b/Defs/jQuery/NuGet.nuspec @@ -5,13 +5,13 @@ API library for jQuery - 5.4.7 + 5.4.8 Sharpkit Ltd Dan-el http://sharpkit.net/ false - + diff --git a/Defs/jQueryUI/NuGet.nuspec b/Defs/jQueryUI/NuGet.nuspec index 1dc4e75..78da34e 100644 --- a/Defs/jQueryUI/NuGet.nuspec +++ b/Defs/jQueryUI/NuGet.nuspec @@ -5,13 +5,13 @@ API library for jQueryUI - 5.4.7 + 5.4.8 Sharpkit Ltd Dan-el http://sharpkit.net/ false - + diff --git a/Defs/make.cmd b/Defs/make.cmd index 7491b8b..29a022f 100755 --- a/Defs/make.cmd +++ b/Defs/make.cmd @@ -1,4 +1,4 @@ @cd /D %~dp0 @call ../scripts/set-variables -%msbuild% Defs.sln +%msbuild% Defs.sln /verbosity:minimal diff --git a/Frameworks/Html.Linq/res/Html.Linq.js b/Frameworks/Html.Linq/res/Html.Linq.js index e7d3b51..42b8f78 100644 --- a/Frameworks/Html.Linq/res/Html.Linq.js +++ b/Frameworks/Html.Linq/res/Html.Linq.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ if (typeof(SharpKit) == "undefined") var SharpKit = {}; @@ -25,6 +25,8 @@ SharpKit.Html.HtmlElementEnumerator = function (root, includeDescendents, includ this.Stack = []; this.Stack.push(this.Root); } + else + null; }; SharpKit.Html.HtmlElementEnumerator.prototype.get_Current = function (){ return this._Current; @@ -50,9 +52,11 @@ SharpKit.Html.HtmlElementEnumerator.prototype.MoveNext = function (){ var node = this._Current; if (node != null){ node = node.nextSibling; - while (node != null && this._Current.nodeType != 1) + while (node != null && node.nodeType != 1) node = node.nextSibling; } + else + null; while (node == null && this.Stack.length > 0){ var parent = this.Stack.pop(); node = parent.firstChild; @@ -62,6 +66,8 @@ SharpKit.Html.HtmlElementEnumerator.prototype.MoveNext = function (){ this._Current = node; if (this._Current == null) return false; + else + null; this.Stack.push(this._Current); return true; } @@ -71,6 +77,8 @@ SharpKit.Html.HtmlElementEnumerator.prototype.Reset = function (){ this.Stack = []; this.Stack.push(this.Root); } + else + null; this._Current = null; }; SharpKit.Html.HtmlElementEnumerator.prototype.GetEnumerator = function (){ diff --git a/Frameworks/Html.Linq/res/SharpKit.Html.Linq.min.js b/Frameworks/Html.Linq/res/SharpKit.Html.Linq.min.js index 680d53b..8d7b2f2 100644 --- a/Frameworks/Html.Linq/res/SharpKit.Html.Linq.min.js +++ b/Frameworks/Html.Linq/res/SharpKit.Html.Linq.min.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ /* Generated by SharpKit 5 v5.4.4 */ if (typeof(SharpKit) == "undefined") diff --git a/Frameworks/JavaScript.NoClr/res/noclr.js b/Frameworks/JavaScript.NoClr/res/noclr.js index cf44a88..0558105 100644 --- a/Frameworks/JavaScript.NoClr/res/noclr.js +++ b/Frameworks/JavaScript.NoClr/res/noclr.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ var ListHelper = function (){ }; @@ -10,6 +10,8 @@ ListHelper.IndexOf = function (list, item){ for (var i = 0; i < length; i++){ if (list[i] == item) return i; + else + null; } return -1; }; @@ -19,6 +21,8 @@ ListHelper.Remove = function (list, item){ list.splice(index, 1); return true; } + else + null; return false; }; diff --git a/Frameworks/JsClr.Test/JsClr.Test.csproj b/Frameworks/JsClr.Test/JsClr.Test.csproj index 6080388..8468562 100644 --- a/Frameworks/JsClr.Test/JsClr.Test.csproj +++ b/Frameworks/JsClr.Test/JsClr.Test.csproj @@ -142,5 +142,6 @@ JsClr - + + \ No newline at end of file diff --git a/Frameworks/JsClr.Test/res/QunitTests.js b/Frameworks/JsClr.Test/res/QunitTests.js index f435c1f..52a8f74 100644 --- a/Frameworks/JsClr.Test/res/QunitTests.js +++ b/Frameworks/JsClr.Test/res/QunitTests.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ if (typeof(JsTypes) == "undefined") var JsTypes = []; diff --git a/Frameworks/JsClr/Compilation/JsCompiler.js b/Frameworks/JsClr/Compilation/JsCompiler.js index 8fa30e4..37f6dc5 100644 --- a/Frameworks/JsClr/Compilation/JsCompiler.js +++ b/Frameworks/JsClr/Compilation/JsCompiler.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -22,37 +22,57 @@ var IsCompiled = false; function RemoveDelegate(delOriginal, delToRemove){ if (delToRemove == null || delOriginal == null) return delOriginal; + else + null; if (delOriginal.isMulticastDelegate){ if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("Multicast to multicast delegate removal is not implemented yet"), new Error()); + else + null; var del = CreateMulticastDelegateFunction(); for (var i = 0; i < delOriginal.delegates.length; i++){ var del2 = delOriginal.delegates[i]; if (del2 != delToRemove){ if (del.delegates == null) del.delegates = []; + else + null; del.delegates.push(del2); } + else + null; } if (del.delegates == null) return null; + else + null; if (del.delegates.length == 1) return del.delegates[0]; + else + null; return del; } else { if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("single to multicast delegate removal is not supported"), new Error()); + else + null; if (delOriginal == delToRemove) return null; + else + null; return delOriginal; } }; function CombineDelegates(del1, del2){ if (del1 == null) return del2; + else + null; if (del2 == null) return del1; + else + null; var del = CreateMulticastDelegateFunction(); del.delegates = []; if (del1.isMulticastDelegate){ @@ -91,11 +111,17 @@ function CreateClrDelegate(type, genericArgs, target, func){ function Typeof(jsTypeOrName){ if (jsTypeOrName == null) throw $CreateException(new Error("Unknown type."), new Error()); + else + null; if (typeof(jsTypeOrName) == "function"){ jsTypeOrName = JsTypeHelper.GetType(jsTypeOrName); } + else + null; if (typeof(jsTypeOrName) == "string") return System.Type.GetType$$String$$Boolean(jsTypeOrName, true); + else + null; return System.Type._TypeOf(jsTypeOrName); }; function JsTypeof(typeName){ @@ -131,69 +157,107 @@ function NewWithInitializer(type, json){ function As(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; return null; }; function Cast(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; var converted = TryImplicitConvert(obj, type); if (converted != null) return converted; + else + null; var objTypeName = typeof(obj); if (typeof(obj.getTypeName) == "function"){ objTypeName = obj.getTypeName(); } + else + null; var msg = new Array("InvalidCastException: Cannot cast ", objTypeName, " to ", type.fullname, "Exception generated by JsRuntime").join(""); throw $CreateException(new Error(msg), new Error()); }; function _TestTypeInterfacesIs(testType, iface, testedInterfaces){ if (testedInterfaces[iface.name]) return false; + else + null; for (var i = 0; i < testType.interfaces.length; i++){ var testIface = testType.interfaces[i]; if (testIface == iface) return true; + else + null; testedInterfaces[testIface.name] = true; if (_TestTypeInterfacesIs(testIface, iface, testedInterfaces)) return true; + else + null; } return false; }; function TypeIs(objType, type){ if (objType == type) return true; + else + null; if (type.Kind == "Interface"){ var testedInterfaces = new Object(); while (objType != null){ if (objType == type) return true; + else + null; if (_TestTypeInterfacesIs(objType, type, testedInterfaces)) return true; + else + null; objType = objType.baseType; } return false; } + else + null; if (type.Kind == "Delegate" && objType.fullname == "System.Delegate"){ return true; } + else + null; if (objType.fullname == "System.Int32"){ if (type.fullname == "System.Decimal") return true; + else + null; if (type.fullname == "System.Double") return true; + else + null; if (type.fullname == "System.Single") return true; + else + null; } + else + null; var t = objType.baseType; while (t != null){ if (t == type) return true; + else + null; t = t.baseType; } return false; @@ -202,6 +266,8 @@ function Is(obj, typeOrName){ if (obj == null){ return false; } + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (type == null){ if (type == null && typeof(typeOrName) == "function"){ @@ -210,16 +276,24 @@ function Is(obj, typeOrName){ while (ctor != null && i < 20){ if (obj instanceof ctor) return true; + else + null; ctor = ctor["$baseCtor"]; i++; } return false; } + else + null; throw $CreateException(new Error("type expected"), new Error()); } + else + null; var objType = GetObjectType(obj); if (objType == null) return false; + else + null; var isIt = TypeIs(objType, type); return isIt; }; @@ -307,10 +381,16 @@ JsCompiler.Compile_Phase1 = function (){ } if (jsType.derivedTypes == null) jsType.derivedTypes = []; + else + null; if (jsType.interfaces == null) jsType.interfaces = []; + else + null; if (jsType.definition == null) jsType.definition = new Object(); + else + null; var index = fullName.lastIndexOf("."); if (index == -1){ jsType.name = fullName; @@ -322,13 +402,21 @@ JsCompiler.Compile_Phase1 = function (){ if (jsType.Kind == "Enum"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.Object"; + else + null; if (jsType.definition["toString"] == Object.prototype.toString) jsType.definition["toString"] = new Function("return this._Name;"); + else + null; } else if (jsType.Kind == "Struct"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.ValueType"; + else + null; } + else + null; } }; JsCompiler.Compile_Phase2 = function (){ @@ -339,6 +427,8 @@ JsCompiler.Compile_Phase2 = function (){ for (var $i4 = 0,$l4 = JsTypes.length,ce = JsTypes[$i4]; $i4 < $l4; $i4++, ce = JsTypes[$i4]){ if (ce.cctor != null) ce.cctor(); + else + null; } JsCompiler.LinkInterfaceMethods(); JsTypes = []; @@ -348,11 +438,17 @@ JsCompiler.Compile_Phase2_TmpType = function (tmpType){ var type = JsCompiler.CompileType(tmpType); if (type != null) JsCompiler.CopyMemberIfNotDefined(type, type.fullname, window); + else + null; if (type.ns != null){ var ns = JsCompiler.ResolveNamespace(type.ns); if (type != null) ns[type.name] = type; + else + null; } + else + null; }; JsCompiler.LinkInterfaceMethods = function (){ for (var it = 0; it < JsTypes.length; it++){ @@ -367,7 +463,11 @@ JsCompiler.LinkInterfaceMethods = function (){ if (shortMem != undefined){ jsType.commonPrototype[longName] = jsType.commonPrototype[shortName]; } + else + null; } + else + null; } } } @@ -438,6 +538,8 @@ JsCompiler.ResolveNamespace = function (nsText){ var token = tokens[i]; if (typeof(ns[token]) == "undefined") ns[token] = {}; + else + null; ns[token].name = tokens.slice(0, i).join("."); ns = ns[token]; } @@ -447,21 +549,31 @@ JsCompiler.ResolveBaseType = function (type, currentType){ var baseType = JsTypeHelper.GetType(type.baseTypeName); if (baseType == null) baseType = JsTypeHelper.GetTypeIgnoreNamespace(type.baseTypeName, true); + else + null; if (!baseType.isCompiled) JsCompiler.CompileType(baseType); + else + null; currentType.baseType = baseType; baseType.derivedTypes.push(currentType); }; JsCompiler.ResolveInterfaces = function (type, currentType){ if (type.interfaceNames == null) - return; + return null; + else + null; for (var i = 0; i < type.interfaceNames.length; i++){ var iName = type.interfaceNames[i]; var iface = JsTypeHelper.GetType(iName); if (iface == null) iface = JsTypeHelper.GetTypeIgnoreNamespace(iName, true); + else + null; if (!iface.isCompiled) JsCompiler.CompileType(iface); + else + null; currentType.interfaces.push(iface); } }; @@ -469,13 +581,19 @@ JsCompiler.CompileType = function (type){ var currentType = (JsCompiler.Types[type.fullname] != null ? JsCompiler.Types[type.fullname] : type); if (currentType.ctors == null) currentType.ctors = new Object(); + else + null; if (!type.isCompiled){ var baseTypeResolved = false; if (currentType.baseType == null && currentType.baseTypeName != null){ JsCompiler.ResolveBaseType(type, currentType); if (currentType.baseType != null) baseTypeResolved = true; + else + null; } + else + null; JsCompiler.ResolveInterfaces(type, currentType); for (var p in type.definition){ if (p.search("ctor") == 0){ @@ -487,21 +605,31 @@ JsCompiler.CompileType = function (type){ currentType[p].prototype = currentType.commonPrototype; currentType.ctors[p] = currentType[p]; } + else + null; if (p == "cctor") currentType.cctor = p; + else + null; } if (currentType.ctor == null){ if (currentType.ns == null || currentType.ns == ""){ var jsCtor = window[currentType.name]; if (typeof(jsCtor) == "function" || typeof(jsCtor) == "object") currentType.ctor = jsCtor; + else + null; } + else + null; if (currentType.ctor == null && currentType.ctors != null){ if (currentType.baseType != null) currentType.ctor = JsCompiler.CreateBaseCtor(currentType); else currentType.ctor = JsCompiler.CreateEmptyCtor(); } + else + null; if (currentType.ctor != null){ currentType.ctors["ctor"] = currentType.ctor; if (typeof(currentType.commonPrototype) == "undefined") @@ -509,15 +637,23 @@ JsCompiler.CompileType = function (type){ else currentType.ctor.prototype = currentType.commonPrototype; } + else + null; } + else + null; for (var p in currentType.ctors){ var ctor = currentType.ctors[p]; if (ctor._type == null) ctor._type = currentType; + else + null; } if (baseTypeResolved){ JsCompiler._CopyObject(currentType.baseType.commonPrototype, currentType.commonPrototype); } + else + null; for (var p in type.definition){ var member = type.definition[p]; currentType.commonPrototype[p] = member; @@ -525,11 +661,15 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } if (type.definition.toString != Object.prototype.toString){ currentType.commonPrototype.toString = type.definition.toString; currentType.commonPrototype.toString._type = currentType; } + else + null; for (var p in type.staticDefinition){ var member = type.staticDefinition[p]; currentType[p] = member; @@ -537,9 +677,13 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } type.isCompiled = true; } + else + null; JsCompiler.CompileEnum(currentType); if (currentType != type && type.customAttributes != null){ if (currentType.customAttributes != null){ @@ -551,6 +695,8 @@ JsCompiler.CompileType = function (type){ currentType.customAttributes = type.customAttributes; } } + else + null; return currentType; }; JsCompiler.CompileEnum = function (currentType){ @@ -563,46 +709,70 @@ JsCompiler.CompileEnum = function (currentType){ currentType.staticDefinition[p] = x; currentType[p] = x; } + else + null; } } + else + null; }; JsCompiler.GetHashKey = function (obj){ if (obj == undefined) return "undefined"; + else + null; if (obj == null) return "null"; + else + null; if (obj.valueOf) obj = obj.valueOf(); + else + null; var type = typeof(obj); if (type == "string") return obj; + else + null; if (type == "object" || type == "function"){ if (obj._hashKey == null){ obj._hashKey = JsCompiler._hashKeyPrefix + JsCompiler._hashKeyIndex; JsCompiler._hashKeyIndex++; } + else + null; return obj._hashKey; } + else + null; return obj.toString(); }; var JsTypeHelper = function (){ }; JsTypeHelper.GetTypeIgnoreNamespaceCache = null; JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ - var type; + var type = null; var cache = JsTypeHelper.GetTypeIgnoreNamespaceCache; if (cache != null){ type = cache[name]; if (typeof(type) != "undefined"){ if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; return type; } + else + null; } + else + null; if (name.search(".") > -1){ var tokens = name.split("."); name = tokens[tokens.length - 1]; } + else + null; type = JsCompiler.Types[name]; var nameAfterNs = "." + name; if (type == null){ @@ -611,12 +781,20 @@ JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ type = JsCompiler.Types[p]; break; } + else + null; } } + else + null; if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; if (cache != null) cache[name] = (type != null ? type : null); + else + null; return type; }; JsTypeHelper._HasTypeArguments = function (typeName){ @@ -629,9 +807,13 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var args = JsTypeHelper._ParseTypeNameArgs(name); if (args == null) return null; + else + null; var type = JsTypeHelper.GetType(args[0], throwIfNotFound); if (type == null) return null; + else + null; var res = new Array(0); res.push(type); var typeArgs = new Array(0); @@ -639,11 +821,15 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var typeArg = JsTypeHelper.GetType(args[1][i][0], throwIfNotFound); if (typeArg == null) return null; + else + null; typeArgs.push(typeArg); } res.push(typeArgs); return res; } + else + null; return null; }; JsTypeHelper._ParseTypeNameArgs = function (name){ @@ -666,25 +852,37 @@ JsTypeHelper.GetType = function (typeOrNameOrCtor, throwIfNotFound){ if (typeof(typeOrNameOrCtor) != "string"){ if (typeof(typeOrNameOrCtor) == "function") return typeOrNameOrCtor._type; + else + null; return typeOrNameOrCtor; } + else + null; var name = typeOrNameOrCtor; var gti = name.indexOf("`"); if (gti != -1){ name = name.substr(0, gti + 2).replace("`", "$"); } + else + null; var type = JsCompiler.Types[name]; if (type == null){ if (throwIfNotFound) throw $CreateException(new Error("JsType " + name + " was not found"), new Error()); + else + null; return null; } + else + null; return type; }; JsTypeHelper.FindType = function (name, throwIfNotFound){ var type = JsTypeHelper.GetType(name, false); if (type == null) type = JsTypeHelper.GetTypeIgnoreNamespace(name, throwIfNotFound); + else + null; return type; }; JsTypeHelper.GetAssemblyQualifiedName = function (type){ @@ -692,8 +890,12 @@ JsTypeHelper.GetAssemblyQualifiedName = function (type){ var name = type.fullname; if (type.assemblyName != null) name += ", " + type.assemblyName; + else + null; type._AssemblyQualifiedName = name; } + else + null; return type._AssemblyQualifiedName; }; JsTypeHelper.GetName = function (type){ @@ -703,6 +905,8 @@ JsTypeHelper.getMemberTypeName = function (instance, memberName){ var signature = instance[memberName + "$$"]; if (signature == null) return null; + else + null; var tokens = signature.split(" "); var memberTypeName = tokens[tokens.length - 1]; return memberTypeName; @@ -711,13 +915,19 @@ JsTypeHelper.GetDelegate = function (obj, func){ var target = obj; if (target == null) return func; + else + null; if (typeof(func) == "string") func = target[func]; + else + null; var cache = target.__delegateCache; if (cache == null){ cache = new Object(); target.__delegateCache = cache; } + else + null; var key = JsCompiler.GetHashKey(func); var del = cache[key]; if (del == null){ @@ -730,6 +940,8 @@ JsTypeHelper.GetDelegate = function (obj, func){ del.isDelegate = true; cache[key] = del; } + else + null; return del; }; diff --git a/Frameworks/JsClr/Internal/Core.js b/Frameworks/JsClr/Internal/Core.js index d533038..a49d063 100644 --- a/Frameworks/JsClr/Internal/Core.js +++ b/Frameworks/JsClr/Internal/Core.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -98,7 +98,7 @@ var System$Array = { }, Sort$1$$T$Array$$Comparison$1: function (T, array, cmpFunc){ var needConvert = !(array instanceof Array); - var sortArray; + var sortArray = null; if (needConvert){ sortArray = new Array(array.length); for (var i = 0; i < array.length; i++) @@ -109,13 +109,17 @@ var System$Array = { if (cmpFunc == null){ cmpFunc = $CreateDelegate(System.Collections.Generic.Comparer$1.get_Default(), System.Collections.Generic.Comparer$1.get_Default().Compare); } + else + null; if (cmpFunc == null){ sortArray.sort(); } else sortArray.sort(cmpFunc); if (!needConvert) - return; + return null; + else + null; for (var i = 0; i < array.length; i++) array[i] = sortArray[i]; }, @@ -177,6 +181,8 @@ var System$Collections$Comparer = { get_Default: function (){ if (System.Collections.Comparer._Default == null) System.Collections.Comparer._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Comparer._Default; } }, @@ -208,10 +214,16 @@ var SharpKit$JavaScript$Private$DefaultComparer = { var yy = y; if (xx.CompareTo) return xx.CompareTo(y); + else + null; if (xx > yy) return 1; + else + null; if (xx < yy) return -1; + else + null; return 0; } } @@ -228,6 +240,8 @@ var System$Collections$Generic$Comparer$1 = { get_Default: function (){ if (System.Collections.Generic.Comparer$1._Default == null) System.Collections.Generic.Comparer$1._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Generic.Comparer$1._Default; } }, @@ -422,6 +436,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 4) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action.", "action"), new Error()); + else + null; }, ctor$$NotifyCollectionChangedAction$$IList: function (action, changedItems){ this.action = 0; @@ -458,8 +474,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { if (action == 0 || action == 1){ if (changedItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("changedItems"), new Error()); + else + null; if (startingIndex < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of startingIndex must be -1 or greater.", "startingIndex"), new Error()); + else + null; if (action == 0) this.InitializeAdd(changedItems, startingIndex); else @@ -468,8 +488,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItems != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItems is null", "changedItems"), new Error()); + else + null; if (startingIndex != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if startingIndex is -1", "startingIndex"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -491,8 +515,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItem != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItem is null", "changedItem"), new Error()); + else + null; if (index != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if index is -1", "index"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -516,10 +544,16 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; if (newItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("newItems"), new Error()); + else + null; if (oldItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("oldItems"), new Error()); + else + null; this.oldItems = oldItems; this.newItems = newItems; this.oldIndex = startingIndex; @@ -535,8 +569,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 3) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Move action.", "action"), new Error()); + else + null; if (index < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of index must be -1 or greater.", "index"), new Error()); + else + null; this.InitializeMove(changedItems, index, oldIndex); }, ctor$$NotifyCollectionChangedAction$$Object$$Int32$$Int32: function (action, changedItem, index, oldIndex){ @@ -557,6 +595,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; this.InitializeReplace([newItem], [oldItem], index); }, Action$$: "System.Collections.Specialized.NotifyCollectionChangedAction", @@ -638,6 +678,8 @@ var System$ComponentModel$AsyncCompletedEventArgs = { throw $CreateException(new System.Reflection.TargetInvocationException.ctor$$Exception(this._error), new Error()); else if (this._cancelled) throw $CreateException(new System.InvalidOperationException.ctor$$String("The operation was cancelled"), new Error()); + else + null; }, Cancelled$$: "System.Boolean", get_Cancelled: function (){ @@ -786,10 +828,16 @@ var System$DateTime = { CompareJsDates: function (d1, d2){ if (d1 == d2) return 0; + else + null; if (d1 == null) return 1; + else + null; if (d2 == null) return -1; + else + null; return d1.valueOf() - d2.valueOf(); }, Now$$: "SharpKit.JavaScript.Private.JsImplDateTime", @@ -827,7 +875,7 @@ var System$DateTime = { return x; }, ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32$$DateTimeKind: function (year, month, day, hour, minute, second, kind){ - var x; + var x = null; if (kind == 1){ x = new Date(Date.UTC(year, month - 1, day, hour, minute, second)); } @@ -840,6 +888,8 @@ var System$DateTime = { Equals$$Object: function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }, GetHashCode: function (){ @@ -1040,15 +1090,21 @@ var System$Enum = { GetName: function (enumType, value){ if (enumType == null || value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (p == value) return p; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, GetNames: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1058,6 +1114,8 @@ var System$Enum = { GetValues: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1070,14 +1128,22 @@ var System$Enum = { Parse$$Type$$String$$Boolean: function (enumType, value, ignoreCase){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; if (value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("value"), new Error()); + else + null; if (value.trim() == System.String.Empty) throw $CreateException(new System.ArgumentException.ctor$$String("value is either an empty string or only contains white space."), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (ignoreCase ? p.toUpperCase() == value.toUpperCase() : p == value) return jsType.staticDefinition[p]; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value is a name, but not one of the named constants defined for the enumeration."), new Error()); } }, @@ -1159,6 +1225,8 @@ var System$Exception = { var ie = this.get_InnerException(); if (ie == null) return this.get_Message(); + else + null; return this.get_Message() + ", " + this.get_InnerException(); }, SetErrorCode: function (hr){ @@ -1320,6 +1388,8 @@ var System$ArgumentOutOfRangeException = { if (System.ArgumentOutOfRangeException._rangeMessage == null){ System.ArgumentOutOfRangeException._rangeMessage = "Arg_ArgumentOutOfRangeException"; } + else + null; return System.ArgumentOutOfRangeException._rangeMessage; } } @@ -1372,11 +1442,15 @@ var System$Guid = { if (o.length != l){ throw $CreateException(new System.ArgumentException.ctor$$String(System.String.Format$$String$$Object("Array should be exactly {0} bytes long.", l)), new Error()); } + else + null; }, CheckNull: function (o){ if (o == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("Value cannot be null."), new Error()); } + else + null; }, Compare: function (x, y){ return (x >= y) ? 1 : -1; @@ -1470,24 +1544,34 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("{"); } + else + null; } System.Guid.AppendInt(stringBuilder, this._a); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._b); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._c); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._d); System.Guid.AppendByte(stringBuilder, this._e); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._f); System.Guid.AppendByte(stringBuilder, this._g); System.Guid.AppendByte(stringBuilder, this._h); @@ -1501,6 +1585,8 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("}"); } + else + null; } return stringBuilder.toString(); }, @@ -1508,45 +1594,71 @@ var System$Guid = { if (this._a != value._a){ return System.Guid.Compare(this._a, value._a); } + else + null; if (this._b != value._b){ return System.Guid.Compare(this._b, value._b); } + else + null; if (this._c != value._c){ return System.Guid.Compare(this._c, value._c); } + else + null; if (this._d != value._d){ return System.Guid.Compare(this._d, value._d); } + else + null; if (this._e != value._e){ return System.Guid.Compare(this._e, value._e); } + else + null; if (this._f != value._f){ return System.Guid.Compare(this._f, value._f); } + else + null; if (this._g != value._g){ return System.Guid.Compare(this._g, value._g); } + else + null; if (this._h != value._h){ return System.Guid.Compare(this._h, value._h); } + else + null; if (this._i != value._i){ return System.Guid.Compare(this._i, value._i); } + else + null; if (this._j != value._j){ return System.Guid.Compare(this._j, value._j); } + else + null; if (this._k != value._k){ return System.Guid.Compare(this._k, value._k); } + else + null; return 0; }, CompareTo$$Object: function (value){ if (value == null){ return 1; } + else + null; if (!(Is(value, System.Guid.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String$$String("value", "Argument of System.Guid.CompareTo should be a Guid."), new Error()); } + else + null; return this.CompareTo$$Guid(Cast(value, System.Guid.ctor)); }, Equals$$Object: function (o){ @@ -1591,10 +1703,14 @@ var System$Guid = { if (a != "d" && a != System.String.Empty){ throw $CreateException(new System.FormatException.ctor$$String("Argument to Guid.ToString(string format) should be \"b\", \"B\", \"d\", \"D\", \"n\", \"N\", \"p\" or \"P\""), new Error()); } + else + null; } } } } + else + null; return this.BaseToString(h, p, b); }, ToString$$String$$IFormatProvider: function (format, provider){ @@ -1660,10 +1776,14 @@ var System$Int64 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -1703,6 +1823,8 @@ Date.prototype.CompareTo = function (value){ Date.prototype.get_Year = function (){ if (this._Kind == 1) return this.getUTCFullYear(); + else + null; return this.getFullYear(); }; Date.prototype.set_Year = function (value){ @@ -1714,6 +1836,8 @@ Date.prototype.set_Year = function (value){ Date.prototype.get_Month = function (){ if (this._Kind == 1) return this.getUTCMonth() + 1; + else + null; return this.getMonth() + 1; }; Date.prototype.set_Month = function (value){ @@ -1725,6 +1849,8 @@ Date.prototype.set_Month = function (value){ Date.prototype.get_Day = function (){ if (this._Kind == 1) return this.getUTCDate(); + else + null; return this.getDate(); }; Date.prototype.set_Day = function (value){ @@ -1736,6 +1862,8 @@ Date.prototype.set_Day = function (value){ Date.prototype.get_Hour = function (){ if (this._Kind == 1) return this.getUTCHours(); + else + null; return this.getHours(); }; Date.prototype.set_Hour = function (value){ @@ -1747,6 +1875,8 @@ Date.prototype.set_Hour = function (value){ Date.prototype.get_Minute = function (){ if (this._Kind == 1) return this.getUTCMinutes(); + else + null; return this.getMinutes(); }; Date.prototype.set_Minute = function (value){ @@ -1758,6 +1888,8 @@ Date.prototype.set_Minute = function (value){ Date.prototype.get_Second = function (){ if (this._Kind == 1) return this.getUTCSeconds(); + else + null; return this.getSeconds(); }; Date.prototype.set_Second = function (value){ @@ -1769,6 +1901,8 @@ Date.prototype.set_Second = function (value){ Date.prototype.get_Millisecond = function (){ if (this._Kind == 1) return this.getUTCMilliseconds(); + else + null; return this.getMilliseconds(); }; Date.prototype.set_Millisecond = function (value){ @@ -1780,6 +1914,8 @@ Date.prototype.set_Millisecond = function (value){ Date.prototype.get_Ticks = function (){ if (this._Kind == 1) return this.getUTCMilliseconds() * 10000; + else + null; return this.getMilliseconds() * 10000; }; Date.prototype.set_Ticks = function (value){ @@ -1795,6 +1931,8 @@ Date.prototype.get_DayOfWeek = function (){ Date.prototype.ToLocalTime = function (){ if (this._Kind != 1) return this; + else + null; var x = this.Clone(); x._Kind = 2; return x; @@ -1802,6 +1940,8 @@ Date.prototype.ToLocalTime = function (){ Date.prototype.ToUniversalTime = function (){ if (this._Kind == 1) return this; + else + null; var x = this.Clone(); x._Kind = 1; return x; @@ -1886,6 +2026,8 @@ Date.prototype.RemoveTime = function (){ Date.prototype.Equals$$Object = function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }; Date.prototype.GetHashCode = function (){ @@ -1897,22 +2039,34 @@ Date.prototype.GetType = function (){ Date.prototype.get_Kind = function (){ if (this._Kind == null) return 2; + else + null; return this._Kind; }; Number.prototype.CompareTo$$Double = function (value){ if (this < value) return -1; + else + null; if (this > value) return 1; + else + null; if (this == value) return 0; + else + null; if (!System.Double.IsNaN(this)) return 1; + else + null; return !System.Double.IsNaN(value) ? -1 : 0; }; Number.prototype.CompareTo$$Int32 = function (value){ if (this < value) return -1; + else + null; return this > value ? 1 : 0; }; var System$Nullable$1 = { @@ -1938,6 +2092,8 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ throw $CreateException(new System.InvalidOperationException.ctor$$String("InvalidOperation_NoValue"), new Error()); } + else + null; return this.value; }, GetValueOrDefault: function (){ @@ -1947,27 +2103,37 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ return defaultValue; } + else + null; return this.value; }, Equals$$Object: function (other){ if (!this.get_HasValue()){ return (other == null); } + else + null; if (other == null){ return false; } + else + null; return this.value.Equals$$Object(other); }, GetHashCode: function (){ if (!this.get_HasValue()){ return 0; } + else + null; return this.value.GetHashCode(); }, toString: function (){ if (!this.get_HasValue()){ return ""; } + else + null; return this.value.toString(); } } @@ -2007,6 +2173,8 @@ var System$Random = { if (num2 < 0){ num2 += 2147483647; } + else + null; num = this.SeedArray[num3]; } for (var j = 1; j < 5; j++){ @@ -2015,6 +2183,8 @@ var System$Random = { if (this.SeedArray[k] < 0){ this.SeedArray[k] += 2147483647; } + else + null; } } this.inext = 0; @@ -2030,13 +2200,19 @@ var System$Random = { if (++num >= 56){ num = 1; } + else + null; if (++num2 >= 56){ num2 = 1; } + else + null; var num3 = this.SeedArray[num] - this.SeedArray[num2]; if (num3 < 0){ num3 += 2147483647; } + else + null; this.SeedArray[num] = num3; this.inext = num; this.inextp = num2; @@ -2051,6 +2227,8 @@ var System$Random = { if (flag){ num = -num; } + else + null; var num2 = num; num2 += 2147483646; return num2 / 4294967293; @@ -2059,16 +2237,22 @@ var System$Random = { if (minValue > maxValue){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("minValue", "Argument_MinMaxValue"), new Error()); } + else + null; var num = maxValue - minValue; if (num <= 2147483647){ return (this.Sample() * num) + minValue; } + else + null; return ((this.GetSampleForLargeRange() * num) + minValue); }, Next$$Int32: function (maxValue){ if (maxValue < 0){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("maxValue", "ArgumentOutOfRange_MustBePositive"), new Error()); } + else + null; return (this.Sample() * maxValue); }, NextDouble: function (){ @@ -2078,6 +2262,8 @@ var System$Random = { if (buffer == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("buffer"), new Error()); } + else + null; for (var i = 0; i < buffer.length; i++){ buffer[i] = (this.InternalSample() % 256); } @@ -2138,6 +2324,8 @@ var System$CharEnumerator = { this.currentElement = this.str.charAt(this.index); return true; } + else + null; this.index = this.str.length; return false; }, @@ -2150,9 +2338,13 @@ var System$CharEnumerator = { if (this.index == -1){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Not Started"), new Error()); } + else + null; if (this.index >= this.str.length){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Ended"), new Error()); } + else + null; return this.currentElement; } } @@ -2203,9 +2395,13 @@ var System$TimeSpan = { if (t1.get__ticks() > t2.get__ticks()){ return 1; } + else + null; if (t1.get__ticks() < t2.get__ticks()){ return -1; } + else + null; return 0; }, FromDays: function (value){ @@ -2221,11 +2417,15 @@ var System$TimeSpan = { if (System.Double.IsNaN(value)){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_CannotBeNaN"), new Error()); } + else + null; var num = value * scale; var num2 = num + ((value >= 0) ? 0.5 : -0.5); if (num2 > 922337203685477 || num2 < -922337203685477){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((num2 * 10000)); }, FromMilliseconds: function (value){ @@ -2247,6 +2447,8 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 10000000; }, TimeToMs: function (hour, minute, second){ @@ -2254,12 +2456,16 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 1000; }, op_UnaryNegation: function (t){ if (t.get__ticks() == System.TimeSpan.MinValue.get__ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-t.get__ticks()); }, op_Subtraction: function (t1, t2){ @@ -2366,6 +2572,8 @@ var System$TimeSpan = { if (num > 922337203685477 || num < -922337203685477){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; this._TotalMilliseconds = num; }, Add: function (ts){ @@ -2376,16 +2584,24 @@ var System$TimeSpan = { if (value == null){ return 1; } + else + null; if (!(Is(value, System.TimeSpan.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_MustBeTimeSpan"), new Error()); } + else + null; var ticks = (Cast(value, System.TimeSpan.ctor)).get__ticks(); if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, CompareTo$$TimeSpan: function (value){ @@ -2393,15 +2609,21 @@ var System$TimeSpan = { if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, Duration: function (){ if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_Duration"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((this.get__ticks() >= 0) ? this.get__ticks() : (-this.get__ticks())); }, Equals$$Object: function (value){ @@ -2417,6 +2639,8 @@ var System$TimeSpan = { if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-this.get__ticks()); }, Subtract: function (ts){ @@ -2424,6 +2648,8 @@ var System$TimeSpan = { if (this.get__ticks() >> 63 != ts.get__ticks() >> 63 && this.get__ticks() >> 63 != num >> 63){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(num); } } @@ -2773,10 +2999,14 @@ var System$UInt32 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -2790,12 +3020,18 @@ var System$Uri = { if (u1 == u2){ return true; } + else + null; if (u1 == null){ return false; } + else + null; if (u2 == null){ return false; } + else + null; return u1._OriginalString == u2._OriginalString; }, op_Inequality: function (u1, u2){ @@ -2845,6 +3081,8 @@ var System$Uri = { else this._Fragment = this._OriginalString.substr(idx); } + else + null; return this._Fragment; }, Query$$: "System.String", @@ -2861,6 +3099,8 @@ var System$Uri = { this._Query = this._OriginalString.substr(idx, idx2 - idx); } } + else + null; return this._Query; } } diff --git a/Frameworks/JsClr/NuGet.nuspec b/Frameworks/JsClr/NuGet.nuspec index 66cda88..1175aa0 100644 --- a/Frameworks/JsClr/NuGet.nuspec +++ b/Frameworks/JsClr/NuGet.nuspec @@ -5,13 +5,13 @@ Javascript implementation for the .NET class implementation - 5.4.7 + 5.4.8 Sharpkit Ltd Dan-el http://sharpkit.net/ false - + diff --git a/Frameworks/JsClr/res/SharpKit.JsClr.js b/Frameworks/JsClr/res/SharpKit.JsClr.js index dda4893..af84596 100644 --- a/Frameworks/JsClr/res/SharpKit.JsClr.js +++ b/Frameworks/JsClr/res/SharpKit.JsClr.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof ($Inherit) == 'undefined') { var $Inherit = function (ce, ce2) { diff --git a/Frameworks/JsClr/res/System.Collections.js b/Frameworks/JsClr/res/System.Collections.js index 97a3e55..c4335d2 100644 --- a/Frameworks/JsClr/res/System.Collections.js +++ b/Frameworks/JsClr/res/System.Collections.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -178,13 +178,19 @@ var System$Collections$Generic$Dictionary$2 = { GetHashKey: function (key){ if (this.Comparer != null) return this.Comparer.GetHashCode$$T(key); + else + null; return SharpKit.JavaScript.Utils.Js.GetHashKey(key); }, Add: function (key, value){ if (key == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("key"), new Error()); + else + null; if (this.ContainsKey(key)) throw $CreateException(new System.ArgumentException.ctor$$String$$String$$Exception("The specified key already exists.", "key", null), new Error()); + else + null; var hashKey = this.GetHashKey(key); this._table[hashKey] = value; this._keys[hashKey] = key; @@ -193,6 +199,8 @@ var System$Collections$Generic$Dictionary$2 = { Remove: function (key){ if (key == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("key"), new Error()); + else + null; var result = this.ContainsKey(key); var hashKey = this.GetHashKey(key); delete this._table[hashKey]; @@ -204,6 +212,8 @@ var System$Collections$Generic$Dictionary$2 = { get_Item$$TKey: function (key){ if (!this.ContainsKey(key)) throw $CreateException(new System.Collections.Generic.KeyNotFoundException.ctor$$String("The specified key does not exist."), new Error()); + else + null; var hashKey = this.GetHashKey(key); return this._table[hashKey]; }, @@ -245,7 +255,7 @@ var System$Collections$Generic$Dictionary$2 = { this._keys = new Object(); this._table = new Object(); this._version++; - return; + return null; } }, TryGetValue: function (key, value){ @@ -290,12 +300,16 @@ var System$Collections$Generic$HashSet$1 = { GetHashKey: function (key){ if (this.Comparer != null) return this.Comparer.GetHashCode$$T(key); + else + null; return SharpKit.JavaScript.Utils.Js.GetHashKey(key); }, Add: function (item){ var key = this.GetHashKey(item); if (this.Hashtable[key] != null) return false; + else + null; this.Hashtable[key] = item; this._Count++; return true; @@ -346,6 +360,8 @@ var System$Collections$Generic$HashSet$1 = { var key = this.GetHashKey(item); if (this.Hashtable[key] === item) return true; + else + null; return false; }, CopyTo: function (array, arrayIndex){ @@ -358,6 +374,8 @@ var System$Collections$Generic$HashSet$1 = { this._Count--; return true; } + else + null; return false; }, GetEnumerator: function (){ @@ -381,6 +399,8 @@ var System$StringComparer = { get_InvariantCultureIgnoreCase: function (){ if (System.StringComparer._InvariantCultureIgnoreCase == null) System.StringComparer._InvariantCultureIgnoreCase = new SharpKit.JavaScript.Private.StringComparer_InvariantCultureIgnoreCase.ctor(); + else + null; return System.StringComparer._InvariantCultureIgnoreCase; } }, @@ -410,13 +430,19 @@ var SharpKit$JavaScript$Private$StringComparer_InvariantCultureIgnoreCase = { Equals$$T$$T: function (x, y){ if (x == y) return true; + else + null; if (x == null || y == null) return false; + else + null; return x.toLowerCase() == y.toLowerCase(); }, GetHashCode$$T: function (obj){ if (obj == null) return "null"; + else + null; return obj.toLowerCase(); } } @@ -491,11 +517,15 @@ var System$Collections$Generic$List$1 = { get_Item$$Int32: function (index){ if (index >= this._list.length || index < 0) throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"), new Error()); + else + null; return this._list[index]; }, set_Item$$Int32: function (index, value){ if (index >= this._list.length || index < 0) throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"), new Error()); + else + null; this._list[index] = value; }, Count$$: "System.Int32", @@ -526,6 +556,8 @@ var System$Collections$Generic$List$1 = { var index = this._list.indexOf(item); if (index == -1) return false; + else + null; this._list.RemoveAt(index); return true; }, @@ -536,6 +568,8 @@ var System$Collections$Generic$List$1 = { this.Clear(); if (items != null) this.AddRange(items); + else + null; }, IndexOf: function (item){ return this._list.indexOf(item); @@ -568,6 +602,8 @@ var System$Collections$Generic$List$1 = { ForEach: function (action){ if (action == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("action"), new Error()); + else + null; for (var i = 0; i < this._list.length; i++){ action(this._list[i]); } @@ -623,6 +659,8 @@ var System$Collections$Generic$Queue$1 = { Dequeue: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot dequeue - queue is empty"), new Error()); + else + null; var item = this._list[0]; this._list.RemoveAt(0); return item; @@ -630,6 +668,8 @@ var System$Collections$Generic$Queue$1 = { Peek: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot peek in queue - queue is empty"), new Error()); + else + null; return this._list[0]; }, Contains: function (item){ @@ -683,11 +723,15 @@ var System$Collections$Generic$Stack$1 = { Pop: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot pop from stack - stack is empty"), new Error()); + else + null; return this._list.pop(); }, Peek: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot peek in stack - stack is empty"), new Error()); + else + null; return this._list[this._list.length - 1]; }, Contains: function (item){ @@ -740,11 +784,15 @@ var System$Collections$ObjectModel$Collection$1 = { ConvertItem: function (item){ if (System.Collections.ObjectModel.Collection$1.IsValidItem(item)) return Cast(item, this.T); + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("item"), new Error()); }, CheckWritable: function (items){ if (items.get_IsReadOnly()) throw $CreateException(new System.NotSupportedException.ctor(), new Error()); + else + null; }, IsSynchronized: function (items){ var c = As(items, System.Collections.ICollection.ctor); @@ -778,6 +826,8 @@ var System$Collections$ObjectModel$Collection$1 = { System.Object.ctor.call(this); if (items == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("items"), new Error()); + else + null; this.items = items; var l = As(items, System.Collections.ICollection.ctor); }, @@ -817,6 +867,8 @@ var System$Collections$ObjectModel$Collection$1 = { var idx = this.IndexOf(item); if (idx == -1) return false; + else + null; this.RemoveItem(idx); return true; }, @@ -867,6 +919,8 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { System.Collections.ObjectModel.Collection$1.ctor.call(this, this.T); if (collection == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("collection"), new Error()); + else + null; var $it4 = collection.GetEnumerator(); while ($it4.MoveNext()){ var item = $it4.get_Current(); @@ -901,6 +955,8 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { var eh = this.CollectionChanged; if (this.reentrant.get_Busy() && eh != null && eh.GetInvocationList().length > 1) throw $CreateException(new System.InvalidOperationException.ctor$$String("Cannot modify the collection while reentrancy is blocked."), new Error()); + else + null; }, ClearItems: function (){ this.CheckReentrancy(); @@ -938,11 +994,15 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { $r1.Dispose(); } } + else + null; }, OnPropertyChanged: function (e){ var eh = this.PropertyChanged; if (eh != null) eh(this, e); + else + null; }, RemoveItem: function (index){ this.CheckReentrancy(); @@ -975,6 +1035,8 @@ var System$Collections$ObjectModel$ReadOnlyCollection$1 = { System.Object.ctor.call(this); if (list == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("list"), new Error()); + else + null; this.list = list; }, Contains: function (value){ @@ -1037,11 +1099,15 @@ var System$Collections$ObjectModel$ReadOnlyObservableCollection$1 = { var eh = this.CollectionChanged; if (eh != null) eh(this, args); + else + null; }, OnPropertyChanged: function (args){ var eh = this.PropertyChanged; if (eh != null) eh(this, args); + else + null; }, SourceCollection_CollectionChanged: function (sender, e){ this.OnCollectionChanged(e); diff --git a/Frameworks/JsClr/res/System.ComponentModel.js b/Frameworks/JsClr/res/System.ComponentModel.js index 8e363f7..083edf5 100644 --- a/Frameworks/JsClr/res/System.ComponentModel.js +++ b/Frameworks/JsClr/res/System.ComponentModel.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -195,64 +195,106 @@ var System$Math = { Sign$$Decimal: function (value){ if (value < 0.0) return -1; + else + null; if (value > 0.0) return 1; + else + null; if (value == 0.0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Double: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int16: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int32: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int64: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$SByte: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Single: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sin: function (a){ diff --git a/Frameworks/JsClr/res/System.Diagnostics.js b/Frameworks/JsClr/res/System.Diagnostics.js index 5b44d74..3df7ebe 100644 --- a/Frameworks/JsClr/res/System.Diagnostics.js +++ b/Frameworks/JsClr/res/System.Diagnostics.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof(JsTypes) == "undefined") @@ -30,14 +30,20 @@ var System$Diagnostics$Trace = { }, TraceWarning$$String: function (msg){ if (!System.Diagnostics.Trace.Enabled) - return; + return null; + else + null; if (System.Diagnostics.Trace.Warnings == null) System.Diagnostics.Trace.Warnings = new System.Collections.Generic.List$1.ctor(System.String.ctor); + else + null; System.Diagnostics.Trace.Warnings.Add(msg); }, TraceWarning$$String$$Object$Array: function (format, args){ if (!System.Diagnostics.Trace.Enabled) - return; + return null; + else + null; System.Diagnostics.Trace.TraceWarning$$String(System.String.Format$$String$$Object$Array(format, args)); } }, diff --git a/Frameworks/JsClr/res/System.Ext.js b/Frameworks/JsClr/res/System.Ext.js index e516843..c1a876c 100644 --- a/Frameworks/JsClr/res/System.Ext.js +++ b/Frameworks/JsClr/res/System.Ext.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -77,6 +77,8 @@ var SharpKit$Extensions2 = { var finalStr = System.String.Concat$$String$$String$$String(s.substr(0, index), replace, s.substr(search.length + index)); return finalStr; } + else + null; return s; }, FixCamelCasing: function (s){ @@ -88,6 +90,8 @@ var SharpKit$Extensions2 = { if (System.Char.IsUpper$$Char(c) && !first){ sb.Append$$Char(" "); } + else + null; sb.Append$$Char(c); first = false; } @@ -99,6 +103,8 @@ var SharpKit$Extensions2 = { TrimEnd: function (s, trimText){ if (s.EndsWith$$String(trimText)) return SharpKit.Extensions2.RemoveLast(s, trimText.length); + else + null; return s; }, EqualsIgnoreCase: function (s1, s2){ @@ -226,8 +232,12 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { Serialize2: function (obj){ if (obj === undefined) return undefined; + else + null; if (obj === null) return null; + else + null; var jsType = typeof(obj); if (jsType == "object"){ return this.SerializeRefOrContent(obj); @@ -256,6 +266,8 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { }; info.FirstRef.$k = info.Ref.$r; } + else + null; return info.Ref; } }, @@ -279,8 +291,12 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { for (var p in obj3){ if (this.IgnoreFields[p]) continue; + else + null; if (!obj3.hasOwnProperty(p)) continue; + else + null; var value = obj3[p]; obj2[p] = this.Serialize2(value); } @@ -299,6 +315,8 @@ var SharpKit$JavaScript$JsNamingHelper = { var di = jsFuncName.indexOf("$"); if (di > 0) methodName = jsFuncName.substr(0, di); + else + null; return methodName; }, ClrTypeToJsTypeRef: function (type){ @@ -306,6 +324,8 @@ var SharpKit$JavaScript$JsNamingHelper = { if (att != null && SharpKit.Extensions2.IsNotNullOrEmpty$$String(att.get_Name())){ return att.get_Name().Replace$$Char$$Char("`", "$"); } + else + null; return type.get_Namespace() + "." + type.get_Name().Replace$$Char$$Char("`", "$"); }, ClrConstructorToJsFunctionName: function (mi){ @@ -336,12 +356,16 @@ var SharpKit$JavaScript$JsNamingHelper = { if (SharpKit.JavaScript.JsNamingHelper.IsPropertySetter(mi)){ return mi.get_Name(); } + else + null; var name = mi.get_Name(); var type = mi.get_DeclaringType(); if (type.get_IsGenericType()){ type = type.GetGenericTypeDefinition(); mi = type.GetMethod$$String(name); } + else + null; var sb = new System.Text.StringBuilder.ctor(); if (mi.get_IsStatic()){ sb.Append$$String(SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(type)); @@ -353,6 +377,8 @@ var SharpKit$JavaScript$JsNamingHelper = { sb.Append$$String("."); } } + else + null; sb.Append$$String(name); SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(), sb); return sb.toString(); diff --git a/Frameworks/JsClr/res/System.IO.js b/Frameworks/JsClr/res/System.IO.js index 41105b6..7d5ab12 100644 --- a/Frameworks/JsClr/res/System.IO.js +++ b/Frameworks/JsClr/res/System.IO.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -43,6 +43,8 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; System.IO.Path.CheckInvalidPathChars(path); var str = path; var length = path.length; @@ -52,30 +54,44 @@ var System$IO$Path = { str = path.substr(0, length); break; } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } if ((extension == null) || (path.length == 0)){ return str; } + else + null; if ((extension.length == 0) || (extension.charAt(0) != ".")){ str = str + "."; } + else + null; return (str + extension); }, CharArrayStartsWithOrdinal: function (array, numChars, compareTo, ignoreCase){ if (numChars < compareTo.length){ return false; } + else + null; if (ignoreCase){ var str = new System.String.ctor$$Char$Array$$Int32$$Int32(array, 0, compareTo.length); return compareTo.Equals$$String$$StringComparison(str, 5); } + else + null; for (var i = 0; i < compareTo.length; i++){ if (array[i] != compareTo.charAt(i)){ return false; } + else + null; } return true; }, @@ -85,17 +101,23 @@ var System$IO$Path = { if (((num2 == 34) || (num2 == 60)) || (((num2 == 62) || (num2 == 124)) || (num2 < 32))){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Argument_InvalidPathChars")), new Error()); } + else + null; } }, CheckSearchPattern: function (searchPattern){ - var num; + var num = null; while ((num = searchPattern.indexOf("..", 4)) != -1){ if ((num + 2) == searchPattern.length){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Arg_InvalidSearchPattern")), new Error()); } + else + null; if ((searchPattern.charAt(num + 2) == System.IO.Path.DirectorySeparatorChar) || (searchPattern.charAt(num + 2) == System.IO.Path.AltDirectorySeparatorChar)){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Arg_InvalidSearchPattern")), new Error()); } + else + null; searchPattern = searchPattern.substr(num + 2); } }, @@ -103,21 +125,31 @@ var System$IO$Path = { if ((path1 == null) || (path2 == null)){ throw $CreateException(new System.ArgumentNullException.ctor$$String((path1 == null) ? "path1" : "path2"), new Error()); } + else + null; System.IO.Path.CheckInvalidPathChars(path1); System.IO.Path.CheckInvalidPathChars(path2); if (path2.length == 0){ return path1; } + else + null; if (path1.length == 0){ return path2; } + else + null; if (System.IO.Path.IsPathRooted(path2)){ return path2; } + else + null; var ch = path1.charAt(path1.length - 1); if (((ch != System.IO.Path.DirectorySeparatorChar) && (ch != System.IO.Path.AltDirectorySeparatorChar)) && (ch != System.IO.Path.VolumeSeparatorChar)){ return (path1 + System.IO.Path.DirectorySeparatorChar + path2); } + else + null; return (path1 + path2); }, FixupPath: function (path){ @@ -133,17 +165,25 @@ var System$IO$Path = { if (length == rootLength){ return null; } + else + null; while (((length > rootLength) && (path.charAt(--length) != System.IO.Path.DirectorySeparatorChar)) && (path.charAt(length) != System.IO.Path.AltDirectorySeparatorChar)){ } return path.substr(0, length); } + else + null; } + else + null; return null; }, GetExtension: function (path){ if (path == null){ return null; } + else + null; System.IO.Path.CheckInvalidPathChars(path); var length = path.length; var startIndex = length; @@ -153,11 +193,17 @@ var System$IO$Path = { if (startIndex != (length - 1)){ return path.substr(startIndex, length - startIndex); } + else + null; return System.String.Empty; } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } return System.String.Empty; }, @@ -171,8 +217,12 @@ var System$IO$Path = { if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ return path.substr(num2 + 1, (length - num2) - 1); } + else + null; } } + else + null; return path; }, GetFileNameWithoutExtension: function (path){ @@ -180,10 +230,14 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; var length = path.lastIndexOf("."); if (length == -1){ return path; } + else + null; return path.substr(0, length); }, GetFullPath: function (path){ @@ -194,6 +248,8 @@ var System$IO$Path = { if (path == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("path"), new Error()); } + else + null; return System.IO.Path.NormalizePath(path, true); }, GetInvalidFileNameChars: function (){ @@ -206,6 +262,8 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; path = System.IO.Path.FixupPath(path); return path.substr(0, System.IO.Path.GetRootLength(path)); }, @@ -225,14 +283,22 @@ var System$IO$Path = { num++; } } + else + null; return num; } + else + null; if ((length >= 2) && (path.charAt(1) == System.IO.Path.VolumeSeparatorChar)){ num = 2; if ((length >= 3) && System.IO.Path.IsDirectorySeparator(path.charAt(2))){ num++; } + else + null; } + else + null; return num; }, GetTempFileName: function (){ @@ -250,39 +316,57 @@ var System$IO$Path = { if (ch == "."){ return (length != (path.length - 1)); } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } } + else + null; return false; }, InternalCombine: function (path1, path2){ if ((path1 == null) || (path2 == null)){ throw $CreateException(new System.ArgumentNullException.ctor$$String((path1 == null) ? "path1" : "path2"), new Error()); } + else + null; System.IO.Path.CheckInvalidPathChars(path1); System.IO.Path.CheckInvalidPathChars(path2); if (path2.length == 0){ throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Argument_PathEmpty"), "path2"), new Error()); } + else + null; if (System.IO.Path.IsPathRooted(path2)){ throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Arg_Path2IsRooted"), "path2"), new Error()); } + else + null; var length = path1.length; if (length == 0){ return path2; } + else + null; var ch = path1.charAt(length - 1); if (((ch != System.IO.Path.DirectorySeparatorChar) && (ch != System.IO.Path.AltDirectorySeparatorChar)) && (ch != System.IO.Path.VolumeSeparatorChar)){ return (path1 + System.IO.Path.DirectorySeparatorChar + path2); } + else + null; return (path1 + path2); }, IsDirectorySeparator: function (c){ if (c != System.IO.Path.DirectorySeparatorChar){ return (c == System.IO.Path.AltDirectorySeparatorChar); } + else + null; return true; }, IsPathRooted: function (path){ @@ -292,7 +376,11 @@ var System$IO$Path = { if (((length >= 1) && ((path.charAt(0) == System.IO.Path.DirectorySeparatorChar) || (path.charAt(0) == System.IO.Path.AltDirectorySeparatorChar))) || ((length >= 2) && (path.charAt(1) == System.IO.Path.VolumeSeparatorChar))){ return true; } + else + null; } + else + null; return false; }, NormalizePath: function (path, fullCheck){ diff --git a/Frameworks/JsClr/res/System.Linq.js b/Frameworks/JsClr/res/System.Linq.js index 1e93272..c841c2d 100644 --- a/Frameworks/JsClr/res/System.Linq.js +++ b/Frameworks/JsClr/res/System.Linq.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -65,11 +65,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() > 0){ return list.get_Item$$Int32(0); } + else + null; } else { var enumerator = source.GetEnumerator(); @@ -77,6 +81,8 @@ var System$Linq$Enumerable = { if (enumerator.MoveNext()){ return enumerator.get_Current(); } + else + null; } finally{ enumerator.Dispose(); @@ -88,15 +94,21 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it5 = source.GetEnumerator(); while ($it5.MoveNext()){ var local = $it5.get_Current(); if (predicate(local)){ return local; } + else + null; } throw $CreateException(System.Linq.Error.NoMatch(), new Error()); }, @@ -104,11 +116,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() > 0){ return list.get_Item$$Int32(0); } + else + null; } else { var enumerator = source.GetEnumerator(); @@ -116,6 +132,8 @@ var System$Linq$Enumerable = { if (enumerator.MoveNext()){ return enumerator.get_Current(); } + else + null; } finally{ enumerator.Dispose(); @@ -127,21 +145,29 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it6 = source.GetEnumerator(); while ($it6.MoveNext()){ var local = $it6.get_Current(); if (predicate(local)){ return local; } + else + null; } return Default(TSource); }, Single$1$$IEnumerable$1: function (TSource, source){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() == 1) @@ -154,6 +180,8 @@ var System$Linq$Enumerable = { try{ if (enumerator.MoveNext()) return enumerator.get_Current(); + else + null; } finally{ enumerator.Dispose(); @@ -164,19 +192,27 @@ var System$Linq$Enumerable = { Single$1$$IEnumerable$1$$Func$2: function (TSource, source, predicate){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; if (predicate == null) throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); + else + null; var $it7 = source.GetEnumerator(); while ($it7.MoveNext()){ var local = $it7.get_Current(); if (predicate(local)) return local; + else + null; } throw $CreateException(System.Linq.Error.NoMatch(), new Error()); }, SingleOrDefault$1$$IEnumerable$1: function (TSource, source){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() == 1) @@ -189,6 +225,8 @@ var System$Linq$Enumerable = { try{ if (enumerator.MoveNext()) return enumerator.get_Current(); + else + null; } finally{ enumerator.Dispose(); @@ -199,13 +237,19 @@ var System$Linq$Enumerable = { SingleOrDefault$1$$IEnumerable$1$$Func$2: function (TSource, source, predicate){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; if (predicate == null) throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); + else + null; var $it8 = source.GetEnumerator(); while ($it8.MoveNext()){ var local = $it8.get_Current(); if (predicate(local)) return local; + else + null; } return Default(TSource); }, @@ -213,24 +257,30 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ var count = list.get_Count(); if (count > 0){ return list.get_Item$$Int32(count - 1); } + else + null; } else { var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ - var current; + var current = null; do{ current = enumerator.get_Current(); } while (enumerator.MoveNext()) return current; } + else + null; } finally{ enumerator.Dispose(); @@ -242,9 +292,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var local = Default(TSource); var flag = false; var $it9 = source.GetEnumerator(); @@ -254,34 +308,44 @@ var System$Linq$Enumerable = { local = local2; flag = true; } + else + null; } if (!flag){ throw $CreateException(System.Linq.Error.NoMatch(), new Error()); } + else + null; return local; }, LastOrDefault$1$$IEnumerable$1: function (TSource, source){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ var count = list.get_Count(); if (count > 0){ return list.get_Item$$Int32(count - 1); } + else + null; } else { var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ - var current; + var current = null; do{ current = enumerator.get_Current(); } while (enumerator.MoveNext()) return current; } + else + null; } finally{ enumerator.Dispose(); @@ -293,9 +357,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var local = Default(TSource); var $it10 = source.GetEnumerator(); while ($it10.MoveNext()){ @@ -303,6 +371,8 @@ var System$Linq$Enumerable = { if (predicate(local2)){ local = local2; } + else + null; } return local; }, @@ -310,43 +380,63 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; if (Is(source, System.Linq.Enumerable.Iterator.ctor)){ return (Cast(source, System.Linq.Enumerable.Iterator.ctor)).Where(predicate); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.WhereArrayIterator.ctor(TSource, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), predicate); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.WhereListIterator.ctor(TSource, Cast(source, System.Collections.Generic.List$1.ctor), predicate); } + else + null; return new System.Linq.Enumerable.WhereEnumerableIterator.ctor(TSource, source, predicate); }, Where$1$$IEnumerable$1$$Func$3: function (TSource, source, predicate){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; throw $CreateException(new System.NotImplementedException.ctor(), new Error()); }, Contains$1$$IEnumerable$1$$TSource: function (TSource, source, value){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var is2 = As(source, System.Collections.Generic.ICollection$1.ctor); if (is2 != null) return is2.Contains(value); + else + null; var $it11 = source.GetEnumerator(); while ($it11.MoveNext()){ var local = $it11.get_Current(); if (local == value) return true; + else + null; } return false; }, @@ -354,15 +444,21 @@ var System$Linq$Enumerable = { if (comparer == null){ return System.Linq.Enumerable.Contains$1$$IEnumerable$1$$TSource(TSource, source, value); } + else + null; if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var $it12 = source.GetEnumerator(); while ($it12.MoveNext()){ var local = $it12.get_Current(); if (comparer.Equals$$T$$T(local, value)){ return true; } + else + null; } return false; }, @@ -370,11 +466,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ return true; } + else + null; } finally{ enumerator.Dispose(); @@ -385,15 +485,21 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it13 = source.GetEnumerator(); while ($it13.MoveNext()){ var local = $it13.get_Current(); if (predicate(local)){ return true; } + else + null; } return false; }, @@ -401,19 +507,27 @@ var System$Linq$Enumerable = { if (first == null){ throw $CreateException(System.Linq.Error.ArgumentNull("first"), new Error()); } + else + null; if (second == null){ throw $CreateException(System.Linq.Error.ArgumentNull("second"), new Error()); } + else + null; return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerable$1.ctor(TSource, first, second); }, Count$1$$IEnumerable$1: function (TSource, source){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var is2 = As(source, System.Collections.Generic.ICollection$1.ctor); if (is2 != null){ return is2.get_Count(); } + else + null; var num = 0; var enumerator = source.GetEnumerator(); try{ @@ -430,9 +544,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var num = 0; var $it14 = source.GetEnumerator(); while ($it14.MoveNext()){ @@ -440,6 +558,8 @@ var System$Linq$Enumerable = { if (predicate(local)){ num++; } + else + null; } return num; }, @@ -447,6 +567,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return new System.Linq.Enumerable.OfTypeIterator.ctor(TResult, source); }, OrderBy$2$$IEnumerable$1$$Func$2: function (TSource, TKey, source, keySelector){ @@ -465,45 +587,63 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, null, false); }, ThenBy$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1: function (TSource, TKey, source, keySelector, comparer){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, comparer, false); }, ThenByDescending$2$$IOrderedEnumerable$1$$Func$2: function (TSource, TKey, source, keySelector){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, null, true); }, ThenByDescending$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1: function (TSource, TKey, source, keySelector, comparer){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, comparer, true); }, Select$2$$IEnumerable$1$$Func$2: function (TSource, TResult, source, selector){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (selector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("selector"), new Error()); } + else + null; if (Is(source, System.Linq.Enumerable.Iterator.ctor)){ return (Cast(source, System.Linq.Enumerable.Iterator.ctor)).Select$1(TResult, selector); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.WhereSelectArrayIterator.ctor(TSource, TResult, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), null, selector); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.WhereSelectListIterator.ctor(TSource, TResult, Cast(source, System.Collections.Generic.List$1.ctor), null, selector); } + else + null; return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(TSource, TResult, source, null, selector); }, Select$2$$IEnumerable$1$$Func$3: function (TSource, TResult, source, selector){ @@ -513,18 +653,26 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (selector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("selector"), new Error()); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.SelectManyArrayIterator.ctor(TSource, TResult, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), selector); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.SelectManyListIterator.ctor(TSource, TResult, Cast(source, System.Collections.Generic.List$1.ctor), selector); } + else + null; return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(TSource, TResult, source, selector); }, SelectMany$2$$IEnumerable$1$$Func$3: function (TSource, TResult, source, selector){ @@ -534,12 +682,18 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (collectionSelector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("collectionSelector"), new Error()); } + else + null; if (resultSelector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("resultSelector"), new Error()); } + else + null; return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(System.Tuple$2.ctor, TResult, System.Linq.Enumerable.SelectMany$2$$IEnumerable$1$$Func$2(TSource, System.Tuple$2.ctor, source, function (t){ return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(TCollection, System.Tuple$2.ctor, collectionSelector(t), function (x){ return System.Tuple.Create$2$$T1$$T2(TSource, TCollection, t, x); @@ -552,6 +706,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var x = new System.Linq.Enumerable.SkipIterator.ctor(TSource, source, count); return x; }, @@ -559,6 +715,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var x = new System.Linq.Enumerable.TakeIterator.ctor(TSource, source, count); return x; }, @@ -566,6 +724,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var arr = []; var $it15 = source.GetEnumerator(); while ($it15.MoveNext()){ @@ -578,6 +738,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return new System.Collections.Generic.List$1.ctor$$IEnumerable$1(TSource, source); } }, @@ -713,6 +875,8 @@ var System$Linq$_OrderedEnumerable$1 = { GetEnumerator: function (){ if (this.sorted == null) this.sorted = this.SortSource(); + else + null; return this.sorted.GetEnumerator(); }, SortSource: function (){ @@ -747,9 +911,13 @@ var System$Linq$_OrderedEnumerable$2 = { if (source == null){ throw $CreateException(System.Linq._Error.ArgumentNull("source"), new Error()); } + else + null; if (keySelector == null){ throw $CreateException(System.Linq._Error.ArgumentNull("keySelector"), new Error()); } + else + null; this.source = source; this.keySelector = keySelector; this.comparer = ((comparer != null) ? comparer : System.Collections.Generic.Comparer$1.get_Default()); @@ -760,12 +928,18 @@ var System$Linq$_OrderedEnumerable$2 = { var z = this.parent.Compare(x, y); if (z != 0) return z; + else + null; } + else + null; var xx = this.keySelector(x); var yy = this.keySelector(y); var zz = this.comparer.Compare(xx, yy); if (this.descending) zz *= -1; + else + null; return zz; } } @@ -797,6 +971,8 @@ var System$Linq$Enumerable$Iterator = { this.state = 1; return this; } + else + null; var iterator = this.Clone(); iterator.state = 1; return iterator; @@ -828,6 +1004,8 @@ var System$Linq$Enumerable$SelectManyEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -857,6 +1035,8 @@ var System$Linq$Enumerable$SelectManyEnumerableIterator = { this.current = this.innerEnumerator.get_Current(); return true; } + else + null; this.innerEnumerator = null; } } @@ -899,16 +1079,22 @@ var System$Linq$Enumerable$SelectManyListIterator = { var innerEnumerable = this.selector(arg); this.innerEnumerator = innerEnumerable.GetEnumerator(); } + else + null; var hadNext = this.innerEnumerator.MoveNext(); if (!hadNext){ this.innerEnumerator = null; continue; } + else + null; this.current = this.innerEnumerator.get_Current(); return true; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ @@ -947,9 +1133,13 @@ var System$Linq$Enumerable$WhereArrayIterator = { this.current = tSource; return true; } + else + null; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult, selector){ @@ -983,6 +1173,8 @@ var System$Linq$Enumerable$WhereEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -1003,6 +1195,8 @@ var System$Linq$Enumerable$WhereEnumerableIterator = { this.current = current; return true; } + else + null; } this.Dispose(); return false; @@ -1051,6 +1245,8 @@ var System$Linq$Enumerable$WhereListIterator = { this.current = current; return true; } + else + null; } this.Dispose(); return false; @@ -1094,9 +1290,13 @@ var System$Linq$Enumerable$WhereSelectArrayIterator = { this.current = this.selector(arg); return true; } + else + null; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ @@ -1133,6 +1333,8 @@ var System$Linq$Enumerable$WhereSelectEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -1153,6 +1355,8 @@ var System$Linq$Enumerable$WhereSelectEnumerableIterator = { this.current = this.selector(current); return true; } + else + null; } this.Dispose(); return false; @@ -1204,6 +1408,8 @@ var System$Linq$Enumerable$WhereSelectListIterator = { this.current = this.selector(current); return true; } + else + null; } this.Dispose(); return false; @@ -1234,6 +1440,8 @@ var System$Linq$Enumerable$OfTypeIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -1242,12 +1450,18 @@ var System$Linq$Enumerable$OfTypeIterator = { MoveNext: function (){ if (this.SourceEnumerator == null) this.SourceEnumerator = this.Source.GetEnumerator(); + else + null; while (true){ if (!this.SourceEnumerator.MoveNext()) return false; + else + null; var item = this.SourceEnumerator.get_Current(); if (Is(item, this.T)) return true; + else + null; } }, Dispose: function (){ @@ -1280,6 +1494,8 @@ var System$Linq$Enumerable$SkipIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -1290,16 +1506,24 @@ var System$Linq$Enumerable$SkipIterator = { this.SourceEnumerator = this.Source.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ for (var i = 0; i < this.SkipCount; i++){ if (!this.SourceEnumerator.MoveNext()) return false; + else + null; } this.State = 2; } + else + null; if (this.State == 2){ return this.SourceEnumerator.MoveNext(); } + else + null; return false; }, Dispose: function (){ @@ -1309,6 +1533,8 @@ var System$Linq$Enumerable$SkipIterator = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new System.Linq.Enumerable.SkipIterator.ctor(this.T, this.Source, this.SkipCount); } } @@ -1335,6 +1561,8 @@ var System$Linq$Enumerable$TakeIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -1345,15 +1573,23 @@ var System$Linq$Enumerable$TakeIterator = { this.SourceEnumerator = this.Source.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ if (this.SourceEnumerator.MoveNext()){ this.TakeIndex++; if (this.TakeIndex <= this.TakeCount) return true; + else + null; } + else + null; this.State = 2; return false; } + else + null; return false; }, Dispose: function (){ @@ -1363,6 +1599,8 @@ var System$Linq$Enumerable$TakeIterator = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new System.Linq.Enumerable.TakeIterator.ctor(this.T, this.Source, this.TakeCount); } } @@ -1411,8 +1649,12 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { Reset: function (){ if (this.FirstEnumerator != null) this.FirstEnumerator.Reset(); + else + null; if (this.SecondEnumerator != null) this.SecondEnumerator.Reset(); + else + null; this.onFirst = true; }, Current$$: "`0", @@ -1420,9 +1662,13 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { if (this.State == 1){ return this.FirstEnumerator.get_Current(); } + else + null; if (this.State == 3){ return this.SecondEnumerator.get_Current(); } + else + null; throw $CreateException(new System.InvalidOperationException.ctor(), new Error()); }, MoveNext: function (){ @@ -1430,22 +1676,34 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { this.FirstEnumerator = this.First.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ if (this.FirstEnumerator.MoveNext()){ return true; } + else + null; this.State = 2; } + else + null; if (this.State == 2){ this.SecondEnumerator = this.Second.GetEnumerator(); this.State = 3; } + else + null; if (this.State == 3){ if (this.SecondEnumerator.MoveNext()){ return true; } + else + null; this.State = 4; } + else + null; return false; }, Dispose: function (){ @@ -1457,6 +1715,8 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerator$1.ctor(this.T, this.First, this.Second); } } @@ -1491,16 +1751,22 @@ var System$Linq$Enumerable$SelectManyArrayIterator = { var innerEnumerable = this.selector(arg); this.innerEnumerator = innerEnumerable.GetEnumerator(); } + else + null; var hadNext = this.innerEnumerator.MoveNext(); if (!hadNext){ this.innerEnumerator = null; continue; } + else + null; this.current = this.innerEnumerator.get_Current(); return true; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ diff --git a/Frameworks/JsClr/res/System.Reflection.js b/Frameworks/JsClr/res/System.Reflection.js index 735113f..be2d6d6 100644 --- a/Frameworks/JsClr/res/System.Reflection.js +++ b/Frameworks/JsClr/res/System.Reflection.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -78,13 +78,21 @@ var System$Reflection$MemberInfo = { var att = this._CustomAttributes[i]; if (attributeType.IsInstanceOfType(att)) list.Add(att); + else + null; } } + else + null; if (inherit){ var bm = this.GetBaseMember(); if (bm != null) bm.AddCustomAttributes(list, attributeType, inherit); + else + null; } + else + null; }, GetCustomAttributes$$Type$$Boolean: function (attributeType, inherit){ var list = new System.Collections.Generic.List$1.ctor(System.Object.ctor); @@ -94,6 +102,8 @@ var System$Reflection$MemberInfo = { GetCustomAttributes$$Boolean: function (inherit){ if (inherit) throw $CreateException(new System.NotImplementedException.ctor$$String("GetCustomAttributes with inherit=true is not implemented"), new Error()); + else + null; this.VerifyCustomAttributes(); return this._CustomAttributes; } @@ -129,15 +139,17 @@ var System$Reflection$MethodInfo = { return this._IsStatic; }, Invoke: function (obj, parameters){ - var func; + var func = null; if (this._IsStatic) func = this.JsFunction; else { if (obj == null) throw $CreateException(new System.Exception.ctor$$String("Cannot invoke non static method without a target object"), new Error()); + else + null; func = obj[this.JsName]; } - var res; + var res = null; if (parameters == null) res = func.apply(obj); else @@ -174,6 +186,8 @@ var System$Reflection$PropertyInfo = { GetValue$$Object$$Object$Array: function (obj, indexes){ if (this._Getter == null) throw $CreateException(new System.Exception.ctor$$String("Property " + this._Name + " doesn\'t have a getter"), new Error()); + else + null; var value = this._Getter.apply(obj, (indexes != null ? indexes : [])); return value; }, @@ -186,6 +200,8 @@ var System$Reflection$PropertyInfo = { SetValue$$Object$$Object$$Object$Array: function (obj, value, indexes){ if (this._Setter == null) throw $CreateException(new System.Exception.ctor$$String("Property " + this._Name + " doesn\'t have a setter"), new Error()); + else + null; if (indexes == null || indexes.length == 0){ this._Setter.call(obj, value); } @@ -222,8 +238,12 @@ var System$Type = { _TypeOf: function (jsType){ if (jsType == null) throw $CreateException(new System.Exception.ctor$$String("Cannot resovle type"), new Error()); + else + null; if (jsType._ClrType == null) jsType._ClrType = new System.Type.ctor(jsType); + else + null; return jsType._ClrType; }, GetType$$String: function (name){ @@ -234,6 +254,8 @@ var System$Type = { var jsTypeAndArgs = JsTypeHelper._GetTypeWithArguments(name, throwOnError); if (jsTypeAndArgs == null) return null; + else + null; var genericType = System.Type._TypeOf(jsTypeAndArgs[0]); var jsTypeArgs = jsTypeAndArgs[1]; for (var i = 0; i < jsTypeArgs.length; i++){ @@ -242,17 +264,25 @@ var System$Type = { var type = genericType._MakeGenericType(jsTypeArgs); return type; } + else + null; var jsType = JsTypeHelper.GetType(name); if (jsType == null){ if (throwOnError) throw $CreateException(new System.Exception.ctor$$String("Type " + name + " was not found"), new Error()); + else + null; return null; } + else + null; return System.Type._TypeOf(jsType); }, GetType$$String$$Boolean$$Boolean: function (name, throwOnError, ignoreCase){ if (ignoreCase) throw $CreateException(new System.NotImplementedException.ctor(), new Error()); + else + null; return System.Type.GetType$$String$$Boolean(name, throwOnError); } }, @@ -275,6 +305,8 @@ var System$Type = { this._Name = this._JsType.name; if (System.Type.EmptyTypes == null) System.Type.EmptyTypes = new Array(0); + else + null; }, IsEnum$$: "System.Boolean", get_IsEnum: function (){ @@ -287,6 +319,8 @@ var System$Type = { get_BaseType: function (){ if (this._JsType.baseType == null) return null; + else + null; return System.Type._TypeOf(this._JsType.baseType); }, FillProperties: function (def){ @@ -295,6 +329,8 @@ var System$Type = { var isSetter = funcName.startsWith("set_"); if (isGetter || isSetter) this.FillProperty(def, funcName, isSetter); + else + null; } }, FillProperty: function (def, funcName, isSetter){ @@ -315,6 +351,8 @@ var System$Type = { else { } } + else + null; if (isSetter) prop._Setter = func; else @@ -323,12 +361,18 @@ var System$Type = { TryFillProperty: function (def, name){ if (def == null) return false; + else + null; var getterName = "get_" + name; var setterName = "set_" + name; if (def.hasOwnProperty(getterName)) this.FillProperty(def, getterName, false); + else + null; if (def.hasOwnProperty(setterName)) this.FillProperty(def, setterName, true); + else + null; return this._PropertiesByName[name] != null; }, GetProperty$$String: function (name){ @@ -338,6 +382,8 @@ var System$Type = { GetProperty$$String$$BindingFlags: function (name, bindingAttr){ if (name == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("name"), new Error()); + else + null; return this.GetProperty$$String(name); }, GetProperty$$String$$Type: function (name, returnType){ @@ -348,21 +394,33 @@ var System$Type = { this._PropertiesByName = new Object(); this._Properties = new Array(); } + else + null; if (this._PropertiesByName.hasOwnProperty(name)) - return; + return null; + else + null; if (this.TryFillProperty(this._JsType.definition, name)) - return; + return null; + else + null; if (this.TryFillProperty(this._JsType.staticDefinition, name)) - return; + return null; + else + null; var baseType = this.get_BaseType(); if (baseType != null){ var pe = baseType.GetProperty$$String(name); if (System.Reflection.PropertyInfo.op_Inequality(pe, null)){ this._PropertiesByName[name] = pe; this._Properties.push(pe); - return; + return null; } + else + null; } + else + null; this._PropertiesByName[name] = null; }, VerifyProperties: function (){ @@ -372,6 +430,8 @@ var System$Type = { this._PropertiesByName = new Object(); this._Properties = new Array(); } + else + null; this.FillProperties(this._JsType.definition); this.FillProperties(this._JsType.staticDefinition); var baseType = this.get_BaseType(); @@ -382,9 +442,15 @@ var System$Type = { this._PropertiesByName[pe._Name] = pe; this._Properties.push(pe); } + else + null; } } + else + null; } + else + null; }, GetProperties: function (){ this.VerifyProperties(); @@ -395,15 +461,21 @@ var System$Type = { for (var funcName in def){ if (funcName == "toString") continue; + else + null; var func = def[funcName]; if (SharpKit.JavaScript.Utils.Js.Typeof(func) != "function") continue; + else + null; var methodName = SharpKit.JavaScript.JsNamingHelper.JsFunctionNameToClrMethodName(funcName); var methods = this._MethodsByName[methodName]; if (methods == null){ methods = []; this._MethodsByName[methodName] = methods; } + else + null; var method = new System.Reflection.MethodInfo.ctor(); methods.push(method); this._Methods.push(method); @@ -419,6 +491,8 @@ var System$Type = { var methods = this._MethodsByName[name]; if (methods == null) return null; + else + null; return methods[0]; }, VerifyMethods: function (){ @@ -433,18 +507,28 @@ var System$Type = { for (var $i18 = 0,$l18 = methods.length,me = methods[$i18]; $i18 < $l18; $i18++, me = methods[$i18]){ if (this._JsType.definition != null && this._JsType.definition.hasOwnProperty(me.JsName)) continue; + else + null; if (this._JsType.staticDefinition != null && this._JsType.staticDefinition.hasOwnProperty(me.JsName)) continue; + else + null; var list = this._MethodsByName[me._Name]; if (list == null){ list = []; this._MethodsByName[me._Name] = list; } + else + null; list.push(me); this._Methods.push(me); } } + else + null; } + else + null; }, GetMethods: function (){ this.VerifyMethods(); @@ -478,10 +562,14 @@ var System$Type = { }, VerifyCustomAttributesOnTypeAndMembers: function (){ if (this.verifiedCustomAttributesOnTypeAndMembers) - return; + return null; + else + null; this.verifiedCustomAttributesOnTypeAndMembers = true; if (this._JsType.customAttributes == null) - return; + return null; + else + null; for (var i = 0; i < this._JsType.customAttributes.length; i++){ var attDef = this._JsType.customAttributes[i]; var attType = JsTypeHelper.GetType(attDef.typeName); @@ -492,12 +580,18 @@ var System$Type = { var value = attDef.namedArguments[propName]; if (SharpKit.JavaScript.Utils.Js.Typeof(value) == "function") value = value.call(null); + else + null; att["set_" + propName].call(att, value); } } + else + null; var target = this.GetAttributeTarget(attDef.targetType, attDef.targetMemberName); if (target._CustomAttributes == null) target._CustomAttributes = new Array(); + else + null; target._CustomAttributes.push(att); } }, @@ -510,6 +604,8 @@ var System$Type = { for (var $i19 = 0,$l19 = methods.length,method = methods[$i19]; $i19 < $l19; $i19++, method = methods[$i19]){ if (method.JsName == memberName) return method; + else + null; } return null; } @@ -541,11 +637,15 @@ return this._MakeGenericType(x); GetGenericArguments: function (){ if (this._TypeArguments == null) return System.Type.EmptyTypes; + else + null; return this._TypeArguments; }, _MakeGenericType: function (typeArguments){ if (this._MakeGenericTypeCache == null) this._MakeGenericTypeCache = new Object(); + else + null; var key = ""; for (var i = 0; i < typeArguments.length; i++){ var typeArg = typeArguments[i]; @@ -565,6 +665,8 @@ return this._MakeGenericType(x); t._DeclaringType = this._DeclaringType; t._CustomAttributes = this._CustomAttributes; } + else + null; return t; } } diff --git a/Frameworks/JsClr/res/System.Text.js b/Frameworks/JsClr/res/System.Text.js index 5f9ff61..bb58c43 100644 --- a/Frameworks/JsClr/res/System.Text.js +++ b/Frameworks/JsClr/res/System.Text.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -74,106 +74,142 @@ var System$Text$StringBuilder = { this.array.push(s); this.length += s.length; } + else + null; }, Insert$$Int32$$Boolean: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.IndexOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value.toString()); return this; }, Insert$$Int32$$Byte: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Char: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Char$Array: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Decimal: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Double: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int16: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int32: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int64: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Object: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$SByte: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Single: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$String: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt16: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt32: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt64: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$String$$Int32: function (index, value, count){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; for (var i = 0; i < count; i++) this.array.insert(index, value); return this; @@ -181,6 +217,8 @@ var System$Text$StringBuilder = { Insert$$Int32$$Char$Array$$Int32: function (index, value, count){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; for (var i = 0; i < count; i++) this.array.insert(index, value); return this; @@ -194,7 +232,9 @@ var System$Text$StringBuilder = { }, set_Length: function (value){ if (value == this.length) - return; + return null; + else + null; if (value > this.length) this.Append$$String(new Array(value + 1).join("\0")); else { diff --git a/Frameworks/JsClr/res/System.js b/Frameworks/JsClr/res/System.js index 2a2306f..8b0e939 100644 --- a/Frameworks/JsClr/res/System.js +++ b/Frameworks/JsClr/res/System.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -55,37 +55,57 @@ var IsCompiled = false; function RemoveDelegate(delOriginal, delToRemove){ if (delToRemove == null || delOriginal == null) return delOriginal; + else + null; if (delOriginal.isMulticastDelegate){ if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("Multicast to multicast delegate removal is not implemented yet"), new Error()); + else + null; var del = CreateMulticastDelegateFunction(); for (var i = 0; i < delOriginal.delegates.length; i++){ var del2 = delOriginal.delegates[i]; if (del2 != delToRemove){ if (del.delegates == null) del.delegates = []; + else + null; del.delegates.push(del2); } + else + null; } if (del.delegates == null) return null; + else + null; if (del.delegates.length == 1) return del.delegates[0]; + else + null; return del; } else { if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("single to multicast delegate removal is not supported"), new Error()); + else + null; if (delOriginal == delToRemove) return null; + else + null; return delOriginal; } }; function CombineDelegates(del1, del2){ if (del1 == null) return del2; + else + null; if (del2 == null) return del1; + else + null; var del = CreateMulticastDelegateFunction(); del.delegates = []; if (del1.isMulticastDelegate){ @@ -124,11 +144,17 @@ function CreateClrDelegate(type, genericArgs, target, func){ function Typeof(jsTypeOrName){ if (jsTypeOrName == null) throw $CreateException(new Error("Unknown type."), new Error()); + else + null; if (typeof(jsTypeOrName) == "function"){ jsTypeOrName = JsTypeHelper.GetType(jsTypeOrName); } + else + null; if (typeof(jsTypeOrName) == "string") return System.Type.GetType$$String$$Boolean(jsTypeOrName, true); + else + null; return System.Type._TypeOf(jsTypeOrName); }; function JsTypeof(typeName){ @@ -164,69 +190,107 @@ function NewWithInitializer(type, json){ function As(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; return null; }; function Cast(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; var converted = TryImplicitConvert(obj, type); if (converted != null) return converted; + else + null; var objTypeName = typeof(obj); if (typeof(obj.getTypeName) == "function"){ objTypeName = obj.getTypeName(); } + else + null; var msg = new Array("InvalidCastException: Cannot cast ", objTypeName, " to ", type.fullname, "Exception generated by JsRuntime").join(""); throw $CreateException(new Error(msg), new Error()); }; function _TestTypeInterfacesIs(testType, iface, testedInterfaces){ if (testedInterfaces[iface.name]) return false; + else + null; for (var i = 0; i < testType.interfaces.length; i++){ var testIface = testType.interfaces[i]; if (testIface == iface) return true; + else + null; testedInterfaces[testIface.name] = true; if (_TestTypeInterfacesIs(testIface, iface, testedInterfaces)) return true; + else + null; } return false; }; function TypeIs(objType, type){ if (objType == type) return true; + else + null; if (type.Kind == "Interface"){ var testedInterfaces = new Object(); while (objType != null){ if (objType == type) return true; + else + null; if (_TestTypeInterfacesIs(objType, type, testedInterfaces)) return true; + else + null; objType = objType.baseType; } return false; } + else + null; if (type.Kind == "Delegate" && objType.fullname == "System.Delegate"){ return true; } + else + null; if (objType.fullname == "System.Int32"){ if (type.fullname == "System.Decimal") return true; + else + null; if (type.fullname == "System.Double") return true; + else + null; if (type.fullname == "System.Single") return true; + else + null; } + else + null; var t = objType.baseType; while (t != null){ if (t == type) return true; + else + null; t = t.baseType; } return false; @@ -235,6 +299,8 @@ function Is(obj, typeOrName){ if (obj == null){ return false; } + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (type == null){ if (type == null && typeof(typeOrName) == "function"){ @@ -243,16 +309,24 @@ function Is(obj, typeOrName){ while (ctor != null && i < 20){ if (obj instanceof ctor) return true; + else + null; ctor = ctor["$baseCtor"]; i++; } return false; } + else + null; throw $CreateException(new Error("type expected"), new Error()); } + else + null; var objType = GetObjectType(obj); if (objType == null) return false; + else + null; var isIt = TypeIs(objType, type); return isIt; }; @@ -340,10 +414,16 @@ JsCompiler.Compile_Phase1 = function (){ } if (jsType.derivedTypes == null) jsType.derivedTypes = []; + else + null; if (jsType.interfaces == null) jsType.interfaces = []; + else + null; if (jsType.definition == null) jsType.definition = new Object(); + else + null; var index = fullName.lastIndexOf("."); if (index == -1){ jsType.name = fullName; @@ -355,13 +435,21 @@ JsCompiler.Compile_Phase1 = function (){ if (jsType.Kind == "Enum"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.Object"; + else + null; if (jsType.definition["toString"] == Object.prototype.toString) jsType.definition["toString"] = new Function("return this._Name;"); + else + null; } else if (jsType.Kind == "Struct"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.ValueType"; + else + null; } + else + null; } }; JsCompiler.Compile_Phase2 = function (){ @@ -372,6 +460,8 @@ JsCompiler.Compile_Phase2 = function (){ for (var $i4 = 0,$l4 = JsTypes.length,ce = JsTypes[$i4]; $i4 < $l4; $i4++, ce = JsTypes[$i4]){ if (ce.cctor != null) ce.cctor(); + else + null; } JsCompiler.LinkInterfaceMethods(); JsTypes = []; @@ -381,11 +471,17 @@ JsCompiler.Compile_Phase2_TmpType = function (tmpType){ var type = JsCompiler.CompileType(tmpType); if (type != null) JsCompiler.CopyMemberIfNotDefined(type, type.fullname, window); + else + null; if (type.ns != null){ var ns = JsCompiler.ResolveNamespace(type.ns); if (type != null) ns[type.name] = type; + else + null; } + else + null; }; JsCompiler.LinkInterfaceMethods = function (){ for (var it = 0; it < JsTypes.length; it++){ @@ -400,7 +496,11 @@ JsCompiler.LinkInterfaceMethods = function (){ if (shortMem != undefined){ jsType.commonPrototype[longName] = jsType.commonPrototype[shortName]; } + else + null; } + else + null; } } } @@ -471,6 +571,8 @@ JsCompiler.ResolveNamespace = function (nsText){ var token = tokens[i]; if (typeof(ns[token]) == "undefined") ns[token] = {}; + else + null; ns[token].name = tokens.slice(0, i).join("."); ns = ns[token]; } @@ -480,21 +582,31 @@ JsCompiler.ResolveBaseType = function (type, currentType){ var baseType = JsTypeHelper.GetType(type.baseTypeName); if (baseType == null) baseType = JsTypeHelper.GetTypeIgnoreNamespace(type.baseTypeName, true); + else + null; if (!baseType.isCompiled) JsCompiler.CompileType(baseType); + else + null; currentType.baseType = baseType; baseType.derivedTypes.push(currentType); }; JsCompiler.ResolveInterfaces = function (type, currentType){ if (type.interfaceNames == null) - return; + return null; + else + null; for (var i = 0; i < type.interfaceNames.length; i++){ var iName = type.interfaceNames[i]; var iface = JsTypeHelper.GetType(iName); if (iface == null) iface = JsTypeHelper.GetTypeIgnoreNamespace(iName, true); + else + null; if (!iface.isCompiled) JsCompiler.CompileType(iface); + else + null; currentType.interfaces.push(iface); } }; @@ -502,13 +614,19 @@ JsCompiler.CompileType = function (type){ var currentType = (JsCompiler.Types[type.fullname] != null ? JsCompiler.Types[type.fullname] : type); if (currentType.ctors == null) currentType.ctors = new Object(); + else + null; if (!type.isCompiled){ var baseTypeResolved = false; if (currentType.baseType == null && currentType.baseTypeName != null){ JsCompiler.ResolveBaseType(type, currentType); if (currentType.baseType != null) baseTypeResolved = true; + else + null; } + else + null; JsCompiler.ResolveInterfaces(type, currentType); for (var p in type.definition){ if (p.search("ctor") == 0){ @@ -520,21 +638,31 @@ JsCompiler.CompileType = function (type){ currentType[p].prototype = currentType.commonPrototype; currentType.ctors[p] = currentType[p]; } + else + null; if (p == "cctor") currentType.cctor = p; + else + null; } if (currentType.ctor == null){ if (currentType.ns == null || currentType.ns == ""){ var jsCtor = window[currentType.name]; if (typeof(jsCtor) == "function" || typeof(jsCtor) == "object") currentType.ctor = jsCtor; + else + null; } + else + null; if (currentType.ctor == null && currentType.ctors != null){ if (currentType.baseType != null) currentType.ctor = JsCompiler.CreateBaseCtor(currentType); else currentType.ctor = JsCompiler.CreateEmptyCtor(); } + else + null; if (currentType.ctor != null){ currentType.ctors["ctor"] = currentType.ctor; if (typeof(currentType.commonPrototype) == "undefined") @@ -542,15 +670,23 @@ JsCompiler.CompileType = function (type){ else currentType.ctor.prototype = currentType.commonPrototype; } + else + null; } + else + null; for (var p in currentType.ctors){ var ctor = currentType.ctors[p]; if (ctor._type == null) ctor._type = currentType; + else + null; } if (baseTypeResolved){ JsCompiler._CopyObject(currentType.baseType.commonPrototype, currentType.commonPrototype); } + else + null; for (var p in type.definition){ var member = type.definition[p]; currentType.commonPrototype[p] = member; @@ -558,11 +694,15 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } if (type.definition.toString != Object.prototype.toString){ currentType.commonPrototype.toString = type.definition.toString; currentType.commonPrototype.toString._type = currentType; } + else + null; for (var p in type.staticDefinition){ var member = type.staticDefinition[p]; currentType[p] = member; @@ -570,9 +710,13 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } type.isCompiled = true; } + else + null; JsCompiler.CompileEnum(currentType); if (currentType != type && type.customAttributes != null){ if (currentType.customAttributes != null){ @@ -584,6 +728,8 @@ JsCompiler.CompileType = function (type){ currentType.customAttributes = type.customAttributes; } } + else + null; return currentType; }; JsCompiler.CompileEnum = function (currentType){ @@ -596,46 +742,70 @@ JsCompiler.CompileEnum = function (currentType){ currentType.staticDefinition[p] = x; currentType[p] = x; } + else + null; } } + else + null; }; JsCompiler.GetHashKey = function (obj){ if (obj == undefined) return "undefined"; + else + null; if (obj == null) return "null"; + else + null; if (obj.valueOf) obj = obj.valueOf(); + else + null; var type = typeof(obj); if (type == "string") return obj; + else + null; if (type == "object" || type == "function"){ if (obj._hashKey == null){ obj._hashKey = JsCompiler._hashKeyPrefix + JsCompiler._hashKeyIndex; JsCompiler._hashKeyIndex++; } + else + null; return obj._hashKey; } + else + null; return obj.toString(); }; var JsTypeHelper = function (){ }; JsTypeHelper.GetTypeIgnoreNamespaceCache = null; JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ - var type; + var type = null; var cache = JsTypeHelper.GetTypeIgnoreNamespaceCache; if (cache != null){ type = cache[name]; if (typeof(type) != "undefined"){ if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; return type; } + else + null; } + else + null; if (name.search(".") > -1){ var tokens = name.split("."); name = tokens[tokens.length - 1]; } + else + null; type = JsCompiler.Types[name]; var nameAfterNs = "." + name; if (type == null){ @@ -644,12 +814,20 @@ JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ type = JsCompiler.Types[p]; break; } + else + null; } } + else + null; if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; if (cache != null) cache[name] = (type != null ? type : null); + else + null; return type; }; JsTypeHelper._HasTypeArguments = function (typeName){ @@ -662,9 +840,13 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var args = JsTypeHelper._ParseTypeNameArgs(name); if (args == null) return null; + else + null; var type = JsTypeHelper.GetType(args[0], throwIfNotFound); if (type == null) return null; + else + null; var res = new Array(0); res.push(type); var typeArgs = new Array(0); @@ -672,11 +854,15 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var typeArg = JsTypeHelper.GetType(args[1][i][0], throwIfNotFound); if (typeArg == null) return null; + else + null; typeArgs.push(typeArg); } res.push(typeArgs); return res; } + else + null; return null; }; JsTypeHelper._ParseTypeNameArgs = function (name){ @@ -699,25 +885,37 @@ JsTypeHelper.GetType = function (typeOrNameOrCtor, throwIfNotFound){ if (typeof(typeOrNameOrCtor) != "string"){ if (typeof(typeOrNameOrCtor) == "function") return typeOrNameOrCtor._type; + else + null; return typeOrNameOrCtor; } + else + null; var name = typeOrNameOrCtor; var gti = name.indexOf("`"); if (gti != -1){ name = name.substr(0, gti + 2).replace("`", "$"); } + else + null; var type = JsCompiler.Types[name]; if (type == null){ if (throwIfNotFound) throw $CreateException(new Error("JsType " + name + " was not found"), new Error()); + else + null; return null; } + else + null; return type; }; JsTypeHelper.FindType = function (name, throwIfNotFound){ var type = JsTypeHelper.GetType(name, false); if (type == null) type = JsTypeHelper.GetTypeIgnoreNamespace(name, throwIfNotFound); + else + null; return type; }; JsTypeHelper.GetAssemblyQualifiedName = function (type){ @@ -725,8 +923,12 @@ JsTypeHelper.GetAssemblyQualifiedName = function (type){ var name = type.fullname; if (type.assemblyName != null) name += ", " + type.assemblyName; + else + null; type._AssemblyQualifiedName = name; } + else + null; return type._AssemblyQualifiedName; }; JsTypeHelper.GetName = function (type){ @@ -736,6 +938,8 @@ JsTypeHelper.getMemberTypeName = function (instance, memberName){ var signature = instance[memberName + "$$"]; if (signature == null) return null; + else + null; var tokens = signature.split(" "); var memberTypeName = tokens[tokens.length - 1]; return memberTypeName; @@ -744,13 +948,19 @@ JsTypeHelper.GetDelegate = function (obj, func){ var target = obj; if (target == null) return func; + else + null; if (typeof(func) == "string") func = target[func]; + else + null; var cache = target.__delegateCache; if (cache == null){ cache = new Object(); target.__delegateCache = cache; } + else + null; var key = JsCompiler.GetHashKey(func); var del = cache[key]; if (del == null){ @@ -763,6 +973,8 @@ JsTypeHelper.GetDelegate = function (obj, func){ del.isDelegate = true; cache[key] = del; } + else + null; return del; }; @@ -815,7 +1027,7 @@ var System$Array = { }, Sort$1$$T$Array$$Comparison$1: function (T, array, cmpFunc){ var needConvert = !(array instanceof Array); - var sortArray; + var sortArray = null; if (needConvert){ sortArray = new Array(array.length); for (var i = 0; i < array.length; i++) @@ -826,13 +1038,17 @@ var System$Array = { if (cmpFunc == null){ cmpFunc = $CreateDelegate(System.Collections.Generic.Comparer$1.get_Default(), System.Collections.Generic.Comparer$1.get_Default().Compare); } + else + null; if (cmpFunc == null){ sortArray.sort(); } else sortArray.sort(cmpFunc); if (!needConvert) - return; + return null; + else + null; for (var i = 0; i < array.length; i++) array[i] = sortArray[i]; }, @@ -894,6 +1110,8 @@ var System$Collections$Comparer = { get_Default: function (){ if (System.Collections.Comparer._Default == null) System.Collections.Comparer._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Comparer._Default; } }, @@ -925,10 +1143,16 @@ var SharpKit$JavaScript$Private$DefaultComparer = { var yy = y; if (xx.CompareTo) return xx.CompareTo(y); + else + null; if (xx > yy) return 1; + else + null; if (xx < yy) return -1; + else + null; return 0; } } @@ -945,6 +1169,8 @@ var System$Collections$Generic$Comparer$1 = { get_Default: function (){ if (System.Collections.Generic.Comparer$1._Default == null) System.Collections.Generic.Comparer$1._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Generic.Comparer$1._Default; } }, @@ -1139,6 +1365,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 4) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action.", "action"), new Error()); + else + null; }, ctor$$NotifyCollectionChangedAction$$IList: function (action, changedItems){ this.action = 0; @@ -1175,8 +1403,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { if (action == 0 || action == 1){ if (changedItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("changedItems"), new Error()); + else + null; if (startingIndex < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of startingIndex must be -1 or greater.", "startingIndex"), new Error()); + else + null; if (action == 0) this.InitializeAdd(changedItems, startingIndex); else @@ -1185,8 +1417,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItems != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItems is null", "changedItems"), new Error()); + else + null; if (startingIndex != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if startingIndex is -1", "startingIndex"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -1208,8 +1444,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItem != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItem is null", "changedItem"), new Error()); + else + null; if (index != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if index is -1", "index"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -1233,10 +1473,16 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; if (newItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("newItems"), new Error()); + else + null; if (oldItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("oldItems"), new Error()); + else + null; this.oldItems = oldItems; this.newItems = newItems; this.oldIndex = startingIndex; @@ -1252,8 +1498,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 3) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Move action.", "action"), new Error()); + else + null; if (index < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of index must be -1 or greater.", "index"), new Error()); + else + null; this.InitializeMove(changedItems, index, oldIndex); }, ctor$$NotifyCollectionChangedAction$$Object$$Int32$$Int32: function (action, changedItem, index, oldIndex){ @@ -1274,6 +1524,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; this.InitializeReplace([newItem], [oldItem], index); }, Action$$: "System.Collections.Specialized.NotifyCollectionChangedAction", @@ -1355,6 +1607,8 @@ var System$ComponentModel$AsyncCompletedEventArgs = { throw $CreateException(new System.Reflection.TargetInvocationException.ctor$$Exception(this._error), new Error()); else if (this._cancelled) throw $CreateException(new System.InvalidOperationException.ctor$$String("The operation was cancelled"), new Error()); + else + null; }, Cancelled$$: "System.Boolean", get_Cancelled: function (){ @@ -1503,10 +1757,16 @@ var System$DateTime = { CompareJsDates: function (d1, d2){ if (d1 == d2) return 0; + else + null; if (d1 == null) return 1; + else + null; if (d2 == null) return -1; + else + null; return d1.valueOf() - d2.valueOf(); }, Now$$: "SharpKit.JavaScript.Private.JsImplDateTime", @@ -1544,7 +1804,7 @@ var System$DateTime = { return x; }, ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32$$DateTimeKind: function (year, month, day, hour, minute, second, kind){ - var x; + var x = null; if (kind == 1){ x = new Date(Date.UTC(year, month - 1, day, hour, minute, second)); } @@ -1557,6 +1817,8 @@ var System$DateTime = { Equals$$Object: function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }, GetHashCode: function (){ @@ -1757,15 +2019,21 @@ var System$Enum = { GetName: function (enumType, value){ if (enumType == null || value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (p == value) return p; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, GetNames: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1775,6 +2043,8 @@ var System$Enum = { GetValues: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1787,14 +2057,22 @@ var System$Enum = { Parse$$Type$$String$$Boolean: function (enumType, value, ignoreCase){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; if (value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("value"), new Error()); + else + null; if (value.trim() == System.String.Empty) throw $CreateException(new System.ArgumentException.ctor$$String("value is either an empty string or only contains white space."), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (ignoreCase ? p.toUpperCase() == value.toUpperCase() : p == value) return jsType.staticDefinition[p]; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value is a name, but not one of the named constants defined for the enumeration."), new Error()); } }, @@ -1876,6 +2154,8 @@ var System$Exception = { var ie = this.get_InnerException(); if (ie == null) return this.get_Message(); + else + null; return this.get_Message() + ", " + this.get_InnerException(); }, SetErrorCode: function (hr){ @@ -2037,6 +2317,8 @@ var System$ArgumentOutOfRangeException = { if (System.ArgumentOutOfRangeException._rangeMessage == null){ System.ArgumentOutOfRangeException._rangeMessage = "Arg_ArgumentOutOfRangeException"; } + else + null; return System.ArgumentOutOfRangeException._rangeMessage; } } @@ -2089,11 +2371,15 @@ var System$Guid = { if (o.length != l){ throw $CreateException(new System.ArgumentException.ctor$$String(System.String.Format$$String$$Object("Array should be exactly {0} bytes long.", l)), new Error()); } + else + null; }, CheckNull: function (o){ if (o == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("Value cannot be null."), new Error()); } + else + null; }, Compare: function (x, y){ return (x >= y) ? 1 : -1; @@ -2187,24 +2473,34 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("{"); } + else + null; } System.Guid.AppendInt(stringBuilder, this._a); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._b); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._c); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._d); System.Guid.AppendByte(stringBuilder, this._e); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._f); System.Guid.AppendByte(stringBuilder, this._g); System.Guid.AppendByte(stringBuilder, this._h); @@ -2218,6 +2514,8 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("}"); } + else + null; } return stringBuilder.toString(); }, @@ -2225,45 +2523,71 @@ var System$Guid = { if (this._a != value._a){ return System.Guid.Compare(this._a, value._a); } + else + null; if (this._b != value._b){ return System.Guid.Compare(this._b, value._b); } + else + null; if (this._c != value._c){ return System.Guid.Compare(this._c, value._c); } + else + null; if (this._d != value._d){ return System.Guid.Compare(this._d, value._d); } + else + null; if (this._e != value._e){ return System.Guid.Compare(this._e, value._e); } + else + null; if (this._f != value._f){ return System.Guid.Compare(this._f, value._f); } + else + null; if (this._g != value._g){ return System.Guid.Compare(this._g, value._g); } + else + null; if (this._h != value._h){ return System.Guid.Compare(this._h, value._h); } + else + null; if (this._i != value._i){ return System.Guid.Compare(this._i, value._i); } + else + null; if (this._j != value._j){ return System.Guid.Compare(this._j, value._j); } + else + null; if (this._k != value._k){ return System.Guid.Compare(this._k, value._k); } + else + null; return 0; }, CompareTo$$Object: function (value){ if (value == null){ return 1; } + else + null; if (!(Is(value, System.Guid.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String$$String("value", "Argument of System.Guid.CompareTo should be a Guid."), new Error()); } + else + null; return this.CompareTo$$Guid(Cast(value, System.Guid.ctor)); }, Equals$$Object: function (o){ @@ -2308,10 +2632,14 @@ var System$Guid = { if (a != "d" && a != System.String.Empty){ throw $CreateException(new System.FormatException.ctor$$String("Argument to Guid.ToString(string format) should be \"b\", \"B\", \"d\", \"D\", \"n\", \"N\", \"p\" or \"P\""), new Error()); } + else + null; } } } } + else + null; return this.BaseToString(h, p, b); }, ToString$$String$$IFormatProvider: function (format, provider){ @@ -2377,10 +2705,14 @@ var System$Int64 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -2420,6 +2752,8 @@ Date.prototype.CompareTo = function (value){ Date.prototype.get_Year = function (){ if (this._Kind == 1) return this.getUTCFullYear(); + else + null; return this.getFullYear(); }; Date.prototype.set_Year = function (value){ @@ -2431,6 +2765,8 @@ Date.prototype.set_Year = function (value){ Date.prototype.get_Month = function (){ if (this._Kind == 1) return this.getUTCMonth() + 1; + else + null; return this.getMonth() + 1; }; Date.prototype.set_Month = function (value){ @@ -2442,6 +2778,8 @@ Date.prototype.set_Month = function (value){ Date.prototype.get_Day = function (){ if (this._Kind == 1) return this.getUTCDate(); + else + null; return this.getDate(); }; Date.prototype.set_Day = function (value){ @@ -2453,6 +2791,8 @@ Date.prototype.set_Day = function (value){ Date.prototype.get_Hour = function (){ if (this._Kind == 1) return this.getUTCHours(); + else + null; return this.getHours(); }; Date.prototype.set_Hour = function (value){ @@ -2464,6 +2804,8 @@ Date.prototype.set_Hour = function (value){ Date.prototype.get_Minute = function (){ if (this._Kind == 1) return this.getUTCMinutes(); + else + null; return this.getMinutes(); }; Date.prototype.set_Minute = function (value){ @@ -2475,6 +2817,8 @@ Date.prototype.set_Minute = function (value){ Date.prototype.get_Second = function (){ if (this._Kind == 1) return this.getUTCSeconds(); + else + null; return this.getSeconds(); }; Date.prototype.set_Second = function (value){ @@ -2486,6 +2830,8 @@ Date.prototype.set_Second = function (value){ Date.prototype.get_Millisecond = function (){ if (this._Kind == 1) return this.getUTCMilliseconds(); + else + null; return this.getMilliseconds(); }; Date.prototype.set_Millisecond = function (value){ @@ -2497,6 +2843,8 @@ Date.prototype.set_Millisecond = function (value){ Date.prototype.get_Ticks = function (){ if (this._Kind == 1) return this.getUTCMilliseconds() * 10000; + else + null; return this.getMilliseconds() * 10000; }; Date.prototype.set_Ticks = function (value){ @@ -2512,6 +2860,8 @@ Date.prototype.get_DayOfWeek = function (){ Date.prototype.ToLocalTime = function (){ if (this._Kind != 1) return this; + else + null; var x = this.Clone(); x._Kind = 2; return x; @@ -2519,6 +2869,8 @@ Date.prototype.ToLocalTime = function (){ Date.prototype.ToUniversalTime = function (){ if (this._Kind == 1) return this; + else + null; var x = this.Clone(); x._Kind = 1; return x; @@ -2603,6 +2955,8 @@ Date.prototype.RemoveTime = function (){ Date.prototype.Equals$$Object = function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }; Date.prototype.GetHashCode = function (){ @@ -2614,22 +2968,34 @@ Date.prototype.GetType = function (){ Date.prototype.get_Kind = function (){ if (this._Kind == null) return 2; + else + null; return this._Kind; }; Number.prototype.CompareTo$$Double = function (value){ if (this < value) return -1; + else + null; if (this > value) return 1; + else + null; if (this == value) return 0; + else + null; if (!System.Double.IsNaN(this)) return 1; + else + null; return !System.Double.IsNaN(value) ? -1 : 0; }; Number.prototype.CompareTo$$Int32 = function (value){ if (this < value) return -1; + else + null; return this > value ? 1 : 0; }; var System$Nullable$1 = { @@ -2655,6 +3021,8 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ throw $CreateException(new System.InvalidOperationException.ctor$$String("InvalidOperation_NoValue"), new Error()); } + else + null; return this.value; }, GetValueOrDefault: function (){ @@ -2664,27 +3032,37 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ return defaultValue; } + else + null; return this.value; }, Equals$$Object: function (other){ if (!this.get_HasValue()){ return (other == null); } + else + null; if (other == null){ return false; } + else + null; return this.value.Equals$$Object(other); }, GetHashCode: function (){ if (!this.get_HasValue()){ return 0; } + else + null; return this.value.GetHashCode(); }, toString: function (){ if (!this.get_HasValue()){ return ""; } + else + null; return this.value.toString(); } } @@ -2724,6 +3102,8 @@ var System$Random = { if (num2 < 0){ num2 += 2147483647; } + else + null; num = this.SeedArray[num3]; } for (var j = 1; j < 5; j++){ @@ -2732,6 +3112,8 @@ var System$Random = { if (this.SeedArray[k] < 0){ this.SeedArray[k] += 2147483647; } + else + null; } } this.inext = 0; @@ -2747,13 +3129,19 @@ var System$Random = { if (++num >= 56){ num = 1; } + else + null; if (++num2 >= 56){ num2 = 1; } + else + null; var num3 = this.SeedArray[num] - this.SeedArray[num2]; if (num3 < 0){ num3 += 2147483647; } + else + null; this.SeedArray[num] = num3; this.inext = num; this.inextp = num2; @@ -2768,6 +3156,8 @@ var System$Random = { if (flag){ num = -num; } + else + null; var num2 = num; num2 += 2147483646; return num2 / 4294967293; @@ -2776,16 +3166,22 @@ var System$Random = { if (minValue > maxValue){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("minValue", "Argument_MinMaxValue"), new Error()); } + else + null; var num = maxValue - minValue; if (num <= 2147483647){ return (this.Sample() * num) + minValue; } + else + null; return ((this.GetSampleForLargeRange() * num) + minValue); }, Next$$Int32: function (maxValue){ if (maxValue < 0){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("maxValue", "ArgumentOutOfRange_MustBePositive"), new Error()); } + else + null; return (this.Sample() * maxValue); }, NextDouble: function (){ @@ -2795,6 +3191,8 @@ var System$Random = { if (buffer == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("buffer"), new Error()); } + else + null; for (var i = 0; i < buffer.length; i++){ buffer[i] = (this.InternalSample() % 256); } @@ -2855,6 +3253,8 @@ var System$CharEnumerator = { this.currentElement = this.str.charAt(this.index); return true; } + else + null; this.index = this.str.length; return false; }, @@ -2867,9 +3267,13 @@ var System$CharEnumerator = { if (this.index == -1){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Not Started"), new Error()); } + else + null; if (this.index >= this.str.length){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Ended"), new Error()); } + else + null; return this.currentElement; } } @@ -2920,9 +3324,13 @@ var System$TimeSpan = { if (t1.get__ticks() > t2.get__ticks()){ return 1; } + else + null; if (t1.get__ticks() < t2.get__ticks()){ return -1; } + else + null; return 0; }, FromDays: function (value){ @@ -2938,11 +3346,15 @@ var System$TimeSpan = { if (System.Double.IsNaN(value)){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_CannotBeNaN"), new Error()); } + else + null; var num = value * scale; var num2 = num + ((value >= 0) ? 0.5 : -0.5); if (num2 > 922337203685477 || num2 < -922337203685477){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((num2 * 10000)); }, FromMilliseconds: function (value){ @@ -2964,6 +3376,8 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 10000000; }, TimeToMs: function (hour, minute, second){ @@ -2971,12 +3385,16 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 1000; }, op_UnaryNegation: function (t){ if (t.get__ticks() == System.TimeSpan.MinValue.get__ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-t.get__ticks()); }, op_Subtraction: function (t1, t2){ @@ -3083,6 +3501,8 @@ var System$TimeSpan = { if (num > 922337203685477 || num < -922337203685477){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; this._TotalMilliseconds = num; }, Add: function (ts){ @@ -3093,16 +3513,24 @@ var System$TimeSpan = { if (value == null){ return 1; } + else + null; if (!(Is(value, System.TimeSpan.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_MustBeTimeSpan"), new Error()); } + else + null; var ticks = (Cast(value, System.TimeSpan.ctor)).get__ticks(); if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, CompareTo$$TimeSpan: function (value){ @@ -3110,15 +3538,21 @@ var System$TimeSpan = { if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, Duration: function (){ if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_Duration"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((this.get__ticks() >= 0) ? this.get__ticks() : (-this.get__ticks())); }, Equals$$Object: function (value){ @@ -3134,6 +3568,8 @@ var System$TimeSpan = { if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-this.get__ticks()); }, Subtract: function (ts){ @@ -3141,6 +3577,8 @@ var System$TimeSpan = { if (this.get__ticks() >> 63 != ts.get__ticks() >> 63 && this.get__ticks() >> 63 != num >> 63){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(num); } } @@ -3490,10 +3928,14 @@ var System$UInt32 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -3507,12 +3949,18 @@ var System$Uri = { if (u1 == u2){ return true; } + else + null; if (u1 == null){ return false; } + else + null; if (u2 == null){ return false; } + else + null; return u1._OriginalString == u2._OriginalString; }, op_Inequality: function (u1, u2){ @@ -3562,6 +4010,8 @@ var System$Uri = { else this._Fragment = this._OriginalString.substr(idx); } + else + null; return this._Fragment; }, Query$$: "System.String", @@ -3578,6 +4028,8 @@ var System$Uri = { this._Query = this._OriginalString.substr(idx, idx2 - idx); } } + else + null; return this._Query; } } diff --git a/Frameworks/JsClr/res/jsclr.js b/Frameworks/JsClr/res/jsclr.js index d532a42..d6dc5ea 100644 --- a/Frameworks/JsClr/res/jsclr.js +++ b/Frameworks/JsClr/res/jsclr.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */ +/* Generated by SharpKit 5 v5.4.8 */ "use strict"; if (typeof($CreateException)=='undefined') { @@ -139,37 +139,57 @@ var IsCompiled = false; function RemoveDelegate(delOriginal, delToRemove){ if (delToRemove == null || delOriginal == null) return delOriginal; + else + null; if (delOriginal.isMulticastDelegate){ if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("Multicast to multicast delegate removal is not implemented yet"), new Error()); + else + null; var del = CreateMulticastDelegateFunction(); for (var i = 0; i < delOriginal.delegates.length; i++){ var del2 = delOriginal.delegates[i]; if (del2 != delToRemove){ if (del.delegates == null) del.delegates = []; + else + null; del.delegates.push(del2); } + else + null; } if (del.delegates == null) return null; + else + null; if (del.delegates.length == 1) return del.delegates[0]; + else + null; return del; } else { if (delToRemove.isMulticastDelegate) throw $CreateException(new System.NotImplementedException.ctor$$String("single to multicast delegate removal is not supported"), new Error()); + else + null; if (delOriginal == delToRemove) return null; + else + null; return delOriginal; } }; function CombineDelegates(del1, del2){ if (del1 == null) return del2; + else + null; if (del2 == null) return del1; + else + null; var del = CreateMulticastDelegateFunction(); del.delegates = []; if (del1.isMulticastDelegate){ @@ -208,11 +228,17 @@ function CreateClrDelegate(type, genericArgs, target, func){ function Typeof(jsTypeOrName){ if (jsTypeOrName == null) throw $CreateException(new Error("Unknown type."), new Error()); + else + null; if (typeof(jsTypeOrName) == "function"){ jsTypeOrName = JsTypeHelper.GetType(jsTypeOrName); } + else + null; if (typeof(jsTypeOrName) == "string") return System.Type.GetType$$String$$Boolean(jsTypeOrName, true); + else + null; return System.Type._TypeOf(jsTypeOrName); }; function JsTypeof(typeName){ @@ -248,69 +274,107 @@ function NewWithInitializer(type, json){ function As(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; return null; }; function Cast(obj, typeOrName){ if (obj == null) return obj; + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (Is(obj, type)) return obj; + else + null; var converted = TryImplicitConvert(obj, type); if (converted != null) return converted; + else + null; var objTypeName = typeof(obj); if (typeof(obj.getTypeName) == "function"){ objTypeName = obj.getTypeName(); } + else + null; var msg = new Array("InvalidCastException: Cannot cast ", objTypeName, " to ", type.fullname, "Exception generated by JsRuntime").join(""); throw $CreateException(new Error(msg), new Error()); }; function _TestTypeInterfacesIs(testType, iface, testedInterfaces){ if (testedInterfaces[iface.name]) return false; + else + null; for (var i = 0; i < testType.interfaces.length; i++){ var testIface = testType.interfaces[i]; if (testIface == iface) return true; + else + null; testedInterfaces[testIface.name] = true; if (_TestTypeInterfacesIs(testIface, iface, testedInterfaces)) return true; + else + null; } return false; }; function TypeIs(objType, type){ if (objType == type) return true; + else + null; if (type.Kind == "Interface"){ var testedInterfaces = new Object(); while (objType != null){ if (objType == type) return true; + else + null; if (_TestTypeInterfacesIs(objType, type, testedInterfaces)) return true; + else + null; objType = objType.baseType; } return false; } + else + null; if (type.Kind == "Delegate" && objType.fullname == "System.Delegate"){ return true; } + else + null; if (objType.fullname == "System.Int32"){ if (type.fullname == "System.Decimal") return true; + else + null; if (type.fullname == "System.Double") return true; + else + null; if (type.fullname == "System.Single") return true; + else + null; } + else + null; var t = objType.baseType; while (t != null){ if (t == type) return true; + else + null; t = t.baseType; } return false; @@ -319,6 +383,8 @@ function Is(obj, typeOrName){ if (obj == null){ return false; } + else + null; var type = JsTypeHelper.GetType(typeOrName, true); if (type == null){ if (type == null && typeof(typeOrName) == "function"){ @@ -327,16 +393,24 @@ function Is(obj, typeOrName){ while (ctor != null && i < 20){ if (obj instanceof ctor) return true; + else + null; ctor = ctor["$baseCtor"]; i++; } return false; } + else + null; throw $CreateException(new Error("type expected"), new Error()); } + else + null; var objType = GetObjectType(obj); if (objType == null) return false; + else + null; var isIt = TypeIs(objType, type); return isIt; }; @@ -424,10 +498,16 @@ JsCompiler.Compile_Phase1 = function (){ } if (jsType.derivedTypes == null) jsType.derivedTypes = []; + else + null; if (jsType.interfaces == null) jsType.interfaces = []; + else + null; if (jsType.definition == null) jsType.definition = new Object(); + else + null; var index = fullName.lastIndexOf("."); if (index == -1){ jsType.name = fullName; @@ -439,13 +519,21 @@ JsCompiler.Compile_Phase1 = function (){ if (jsType.Kind == "Enum"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.Object"; + else + null; if (jsType.definition["toString"] == Object.prototype.toString) jsType.definition["toString"] = new Function("return this._Name;"); + else + null; } else if (jsType.Kind == "Struct"){ if (jsType.baseTypeName == null) jsType.baseTypeName = "System.ValueType"; + else + null; } + else + null; } }; JsCompiler.Compile_Phase2 = function (){ @@ -456,6 +544,8 @@ JsCompiler.Compile_Phase2 = function (){ for (var $i4 = 0,$l4 = JsTypes.length,ce = JsTypes[$i4]; $i4 < $l4; $i4++, ce = JsTypes[$i4]){ if (ce.cctor != null) ce.cctor(); + else + null; } JsCompiler.LinkInterfaceMethods(); JsTypes = []; @@ -465,11 +555,17 @@ JsCompiler.Compile_Phase2_TmpType = function (tmpType){ var type = JsCompiler.CompileType(tmpType); if (type != null) JsCompiler.CopyMemberIfNotDefined(type, type.fullname, window); + else + null; if (type.ns != null){ var ns = JsCompiler.ResolveNamespace(type.ns); if (type != null) ns[type.name] = type; + else + null; } + else + null; }; JsCompiler.LinkInterfaceMethods = function (){ for (var it = 0; it < JsTypes.length; it++){ @@ -484,7 +580,11 @@ JsCompiler.LinkInterfaceMethods = function (){ if (shortMem != undefined){ jsType.commonPrototype[longName] = jsType.commonPrototype[shortName]; } + else + null; } + else + null; } } } @@ -555,6 +655,8 @@ JsCompiler.ResolveNamespace = function (nsText){ var token = tokens[i]; if (typeof(ns[token]) == "undefined") ns[token] = {}; + else + null; ns[token].name = tokens.slice(0, i).join("."); ns = ns[token]; } @@ -564,21 +666,31 @@ JsCompiler.ResolveBaseType = function (type, currentType){ var baseType = JsTypeHelper.GetType(type.baseTypeName); if (baseType == null) baseType = JsTypeHelper.GetTypeIgnoreNamespace(type.baseTypeName, true); + else + null; if (!baseType.isCompiled) JsCompiler.CompileType(baseType); + else + null; currentType.baseType = baseType; baseType.derivedTypes.push(currentType); }; JsCompiler.ResolveInterfaces = function (type, currentType){ if (type.interfaceNames == null) - return; + return null; + else + null; for (var i = 0; i < type.interfaceNames.length; i++){ var iName = type.interfaceNames[i]; var iface = JsTypeHelper.GetType(iName); if (iface == null) iface = JsTypeHelper.GetTypeIgnoreNamespace(iName, true); + else + null; if (!iface.isCompiled) JsCompiler.CompileType(iface); + else + null; currentType.interfaces.push(iface); } }; @@ -586,13 +698,19 @@ JsCompiler.CompileType = function (type){ var currentType = (JsCompiler.Types[type.fullname] != null ? JsCompiler.Types[type.fullname] : type); if (currentType.ctors == null) currentType.ctors = new Object(); + else + null; if (!type.isCompiled){ var baseTypeResolved = false; if (currentType.baseType == null && currentType.baseTypeName != null){ JsCompiler.ResolveBaseType(type, currentType); if (currentType.baseType != null) baseTypeResolved = true; + else + null; } + else + null; JsCompiler.ResolveInterfaces(type, currentType); for (var p in type.definition){ if (p.search("ctor") == 0){ @@ -604,21 +722,31 @@ JsCompiler.CompileType = function (type){ currentType[p].prototype = currentType.commonPrototype; currentType.ctors[p] = currentType[p]; } + else + null; if (p == "cctor") currentType.cctor = p; + else + null; } if (currentType.ctor == null){ if (currentType.ns == null || currentType.ns == ""){ var jsCtor = window[currentType.name]; if (typeof(jsCtor) == "function" || typeof(jsCtor) == "object") currentType.ctor = jsCtor; + else + null; } + else + null; if (currentType.ctor == null && currentType.ctors != null){ if (currentType.baseType != null) currentType.ctor = JsCompiler.CreateBaseCtor(currentType); else currentType.ctor = JsCompiler.CreateEmptyCtor(); } + else + null; if (currentType.ctor != null){ currentType.ctors["ctor"] = currentType.ctor; if (typeof(currentType.commonPrototype) == "undefined") @@ -626,15 +754,23 @@ JsCompiler.CompileType = function (type){ else currentType.ctor.prototype = currentType.commonPrototype; } + else + null; } + else + null; for (var p in currentType.ctors){ var ctor = currentType.ctors[p]; if (ctor._type == null) ctor._type = currentType; + else + null; } if (baseTypeResolved){ JsCompiler._CopyObject(currentType.baseType.commonPrototype, currentType.commonPrototype); } + else + null; for (var p in type.definition){ var member = type.definition[p]; currentType.commonPrototype[p] = member; @@ -642,11 +778,15 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } if (type.definition.toString != Object.prototype.toString){ currentType.commonPrototype.toString = type.definition.toString; currentType.commonPrototype.toString._type = currentType; } + else + null; for (var p in type.staticDefinition){ var member = type.staticDefinition[p]; currentType[p] = member; @@ -654,9 +794,13 @@ JsCompiler.CompileType = function (type){ member._name = p; member._type = currentType; } + else + null; } type.isCompiled = true; } + else + null; JsCompiler.CompileEnum(currentType); if (currentType != type && type.customAttributes != null){ if (currentType.customAttributes != null){ @@ -668,6 +812,8 @@ JsCompiler.CompileType = function (type){ currentType.customAttributes = type.customAttributes; } } + else + null; return currentType; }; JsCompiler.CompileEnum = function (currentType){ @@ -680,46 +826,70 @@ JsCompiler.CompileEnum = function (currentType){ currentType.staticDefinition[p] = x; currentType[p] = x; } + else + null; } } + else + null; }; JsCompiler.GetHashKey = function (obj){ if (obj == undefined) return "undefined"; + else + null; if (obj == null) return "null"; + else + null; if (obj.valueOf) obj = obj.valueOf(); + else + null; var type = typeof(obj); if (type == "string") return obj; + else + null; if (type == "object" || type == "function"){ if (obj._hashKey == null){ obj._hashKey = JsCompiler._hashKeyPrefix + JsCompiler._hashKeyIndex; JsCompiler._hashKeyIndex++; } + else + null; return obj._hashKey; } + else + null; return obj.toString(); }; var JsTypeHelper = function (){ }; JsTypeHelper.GetTypeIgnoreNamespaceCache = null; JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ - var type; + var type = null; var cache = JsTypeHelper.GetTypeIgnoreNamespaceCache; if (cache != null){ type = cache[name]; if (typeof(type) != "undefined"){ if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; return type; } + else + null; } + else + null; if (name.search(".") > -1){ var tokens = name.split("."); name = tokens[tokens.length - 1]; } + else + null; type = JsCompiler.Types[name]; var nameAfterNs = "." + name; if (type == null){ @@ -728,12 +898,20 @@ JsTypeHelper.GetTypeIgnoreNamespace = function (name, throwIfNotFound){ type = JsCompiler.Types[p]; break; } + else + null; } } + else + null; if (throwIfNotFound && type == null) throw $CreateException(new Error("type " + name + " was not found with (with IgnoreNamespace)."), new Error()); + else + null; if (cache != null) cache[name] = (type != null ? type : null); + else + null; return type; }; JsTypeHelper._HasTypeArguments = function (typeName){ @@ -746,9 +924,13 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var args = JsTypeHelper._ParseTypeNameArgs(name); if (args == null) return null; + else + null; var type = JsTypeHelper.GetType(args[0], throwIfNotFound); if (type == null) return null; + else + null; var res = new Array(0); res.push(type); var typeArgs = new Array(0); @@ -756,11 +938,15 @@ JsTypeHelper._GetTypeWithArguments = function (typeName, throwIfNotFound){ var typeArg = JsTypeHelper.GetType(args[1][i][0], throwIfNotFound); if (typeArg == null) return null; + else + null; typeArgs.push(typeArg); } res.push(typeArgs); return res; } + else + null; return null; }; JsTypeHelper._ParseTypeNameArgs = function (name){ @@ -783,25 +969,37 @@ JsTypeHelper.GetType = function (typeOrNameOrCtor, throwIfNotFound){ if (typeof(typeOrNameOrCtor) != "string"){ if (typeof(typeOrNameOrCtor) == "function") return typeOrNameOrCtor._type; + else + null; return typeOrNameOrCtor; } + else + null; var name = typeOrNameOrCtor; var gti = name.indexOf("`"); if (gti != -1){ name = name.substr(0, gti + 2).replace("`", "$"); } + else + null; var type = JsCompiler.Types[name]; if (type == null){ if (throwIfNotFound) throw $CreateException(new Error("JsType " + name + " was not found"), new Error()); + else + null; return null; } + else + null; return type; }; JsTypeHelper.FindType = function (name, throwIfNotFound){ var type = JsTypeHelper.GetType(name, false); if (type == null) type = JsTypeHelper.GetTypeIgnoreNamespace(name, throwIfNotFound); + else + null; return type; }; JsTypeHelper.GetAssemblyQualifiedName = function (type){ @@ -809,8 +1007,12 @@ JsTypeHelper.GetAssemblyQualifiedName = function (type){ var name = type.fullname; if (type.assemblyName != null) name += ", " + type.assemblyName; + else + null; type._AssemblyQualifiedName = name; } + else + null; return type._AssemblyQualifiedName; }; JsTypeHelper.GetName = function (type){ @@ -820,6 +1022,8 @@ JsTypeHelper.getMemberTypeName = function (instance, memberName){ var signature = instance[memberName + "$$"]; if (signature == null) return null; + else + null; var tokens = signature.split(" "); var memberTypeName = tokens[tokens.length - 1]; return memberTypeName; @@ -828,13 +1032,19 @@ JsTypeHelper.GetDelegate = function (obj, func){ var target = obj; if (target == null) return func; + else + null; if (typeof(func) == "string") func = target[func]; + else + null; var cache = target.__delegateCache; if (cache == null){ cache = new Object(); target.__delegateCache = cache; } + else + null; var key = JsCompiler.GetHashKey(func); var del = cache[key]; if (del == null){ @@ -847,6 +1057,8 @@ JsTypeHelper.GetDelegate = function (obj, func){ del.isDelegate = true; cache[key] = del; } + else + null; return del; }; @@ -899,7 +1111,7 @@ var System$Array = { }, Sort$1$$T$Array$$Comparison$1: function (T, array, cmpFunc){ var needConvert = !(array instanceof Array); - var sortArray; + var sortArray = null; if (needConvert){ sortArray = new Array(array.length); for (var i = 0; i < array.length; i++) @@ -910,13 +1122,17 @@ var System$Array = { if (cmpFunc == null){ cmpFunc = $CreateDelegate(System.Collections.Generic.Comparer$1.get_Default(), System.Collections.Generic.Comparer$1.get_Default().Compare); } + else + null; if (cmpFunc == null){ sortArray.sort(); } else sortArray.sort(cmpFunc); if (!needConvert) - return; + return null; + else + null; for (var i = 0; i < array.length; i++) array[i] = sortArray[i]; }, @@ -978,6 +1194,8 @@ var System$Collections$Comparer = { get_Default: function (){ if (System.Collections.Comparer._Default == null) System.Collections.Comparer._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Comparer._Default; } }, @@ -1009,10 +1227,16 @@ var SharpKit$JavaScript$Private$DefaultComparer = { var yy = y; if (xx.CompareTo) return xx.CompareTo(y); + else + null; if (xx > yy) return 1; + else + null; if (xx < yy) return -1; + else + null; return 0; } } @@ -1029,6 +1253,8 @@ var System$Collections$Generic$Comparer$1 = { get_Default: function (){ if (System.Collections.Generic.Comparer$1._Default == null) System.Collections.Generic.Comparer$1._Default = new SharpKit.JavaScript.Private.DefaultComparer.ctor(); + else + null; return System.Collections.Generic.Comparer$1._Default; } }, @@ -1223,6 +1449,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 4) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action.", "action"), new Error()); + else + null; }, ctor$$NotifyCollectionChangedAction$$IList: function (action, changedItems){ this.action = 0; @@ -1259,8 +1487,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { if (action == 0 || action == 1){ if (changedItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("changedItems"), new Error()); + else + null; if (startingIndex < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of startingIndex must be -1 or greater.", "startingIndex"), new Error()); + else + null; if (action == 0) this.InitializeAdd(changedItems, startingIndex); else @@ -1269,8 +1501,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItems != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItems is null", "changedItems"), new Error()); + else + null; if (startingIndex != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if startingIndex is -1", "startingIndex"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -1292,8 +1528,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { else if (action == 4){ if (changedItem != null) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if changedItem is null", "changedItem"), new Error()); + else + null; if (index != -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset action if index is -1", "index"), new Error()); + else + null; } else { throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Reset, Add, or Remove actions.", "action"), new Error()); @@ -1317,10 +1557,16 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; if (newItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("newItems"), new Error()); + else + null; if (oldItems == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("oldItems"), new Error()); + else + null; this.oldItems = oldItems; this.newItems = newItems; this.oldIndex = startingIndex; @@ -1336,8 +1582,12 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 3) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Move action.", "action"), new Error()); + else + null; if (index < -1) throw $CreateException(new System.ArgumentException.ctor$$String$$String("The value of index must be -1 or greater.", "index"), new Error()); + else + null; this.InitializeMove(changedItems, index, oldIndex); }, ctor$$NotifyCollectionChangedAction$$Object$$Int32$$Int32: function (action, changedItem, index, oldIndex){ @@ -1358,6 +1608,8 @@ var System$Collections$Specialized$NotifyCollectionChangedEventArgs = { this.action = action; if (action != 2) throw $CreateException(new System.ArgumentException.ctor$$String$$String("This constructor can only be used with the Replace action.", "action"), new Error()); + else + null; this.InitializeReplace([newItem], [oldItem], index); }, Action$$: "System.Collections.Specialized.NotifyCollectionChangedAction", @@ -1439,6 +1691,8 @@ var System$ComponentModel$AsyncCompletedEventArgs = { throw $CreateException(new System.Reflection.TargetInvocationException.ctor$$Exception(this._error), new Error()); else if (this._cancelled) throw $CreateException(new System.InvalidOperationException.ctor$$String("The operation was cancelled"), new Error()); + else + null; }, Cancelled$$: "System.Boolean", get_Cancelled: function (){ @@ -1587,10 +1841,16 @@ var System$DateTime = { CompareJsDates: function (d1, d2){ if (d1 == d2) return 0; + else + null; if (d1 == null) return 1; + else + null; if (d2 == null) return -1; + else + null; return d1.valueOf() - d2.valueOf(); }, Now$$: "SharpKit.JavaScript.Private.JsImplDateTime", @@ -1628,7 +1888,7 @@ var System$DateTime = { return x; }, ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32$$DateTimeKind: function (year, month, day, hour, minute, second, kind){ - var x; + var x = null; if (kind == 1){ x = new Date(Date.UTC(year, month - 1, day, hour, minute, second)); } @@ -1641,6 +1901,8 @@ var System$DateTime = { Equals$$Object: function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }, GetHashCode: function (){ @@ -1841,15 +2103,21 @@ var System$Enum = { GetName: function (enumType, value){ if (enumType == null || value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (p == value) return p; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, GetNames: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1859,6 +2127,8 @@ var System$Enum = { GetValues: function (enumType){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; var jsType = enumType._JsType; var array = new Array(); for (var p in jsType.staticDefinition) @@ -1871,14 +2141,22 @@ var System$Enum = { Parse$$Type$$String$$Boolean: function (enumType, value, ignoreCase){ if (enumType == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"), new Error()); + else + null; if (value == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("value"), new Error()); + else + null; if (value.trim() == System.String.Empty) throw $CreateException(new System.ArgumentException.ctor$$String("value is either an empty string or only contains white space."), new Error()); + else + null; var jsType = enumType._JsType; for (var p in jsType.staticDefinition) if (ignoreCase ? p.toUpperCase() == value.toUpperCase() : p == value) return jsType.staticDefinition[p]; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value is a name, but not one of the named constants defined for the enumeration."), new Error()); } }, @@ -1960,6 +2238,8 @@ var System$Exception = { var ie = this.get_InnerException(); if (ie == null) return this.get_Message(); + else + null; return this.get_Message() + ", " + this.get_InnerException(); }, SetErrorCode: function (hr){ @@ -2121,6 +2401,8 @@ var System$ArgumentOutOfRangeException = { if (System.ArgumentOutOfRangeException._rangeMessage == null){ System.ArgumentOutOfRangeException._rangeMessage = "Arg_ArgumentOutOfRangeException"; } + else + null; return System.ArgumentOutOfRangeException._rangeMessage; } } @@ -2173,11 +2455,15 @@ var System$Guid = { if (o.length != l){ throw $CreateException(new System.ArgumentException.ctor$$String(System.String.Format$$String$$Object("Array should be exactly {0} bytes long.", l)), new Error()); } + else + null; }, CheckNull: function (o){ if (o == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("Value cannot be null."), new Error()); } + else + null; }, Compare: function (x, y){ return (x >= y) ? 1 : -1; @@ -2271,24 +2557,34 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("{"); } + else + null; } System.Guid.AppendInt(stringBuilder, this._a); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._b); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendShort(stringBuilder, this._c); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._d); System.Guid.AppendByte(stringBuilder, this._e); if (h){ stringBuilder.Append$$Char("-"); } + else + null; System.Guid.AppendByte(stringBuilder, this._f); System.Guid.AppendByte(stringBuilder, this._g); System.Guid.AppendByte(stringBuilder, this._h); @@ -2302,6 +2598,8 @@ var System$Guid = { if (b){ stringBuilder.Append$$Char("}"); } + else + null; } return stringBuilder.toString(); }, @@ -2309,45 +2607,71 @@ var System$Guid = { if (this._a != value._a){ return System.Guid.Compare(this._a, value._a); } + else + null; if (this._b != value._b){ return System.Guid.Compare(this._b, value._b); } + else + null; if (this._c != value._c){ return System.Guid.Compare(this._c, value._c); } + else + null; if (this._d != value._d){ return System.Guid.Compare(this._d, value._d); } + else + null; if (this._e != value._e){ return System.Guid.Compare(this._e, value._e); } + else + null; if (this._f != value._f){ return System.Guid.Compare(this._f, value._f); } + else + null; if (this._g != value._g){ return System.Guid.Compare(this._g, value._g); } + else + null; if (this._h != value._h){ return System.Guid.Compare(this._h, value._h); } + else + null; if (this._i != value._i){ return System.Guid.Compare(this._i, value._i); } + else + null; if (this._j != value._j){ return System.Guid.Compare(this._j, value._j); } + else + null; if (this._k != value._k){ return System.Guid.Compare(this._k, value._k); } + else + null; return 0; }, CompareTo$$Object: function (value){ if (value == null){ return 1; } + else + null; if (!(Is(value, System.Guid.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String$$String("value", "Argument of System.Guid.CompareTo should be a Guid."), new Error()); } + else + null; return this.CompareTo$$Guid(Cast(value, System.Guid.ctor)); }, Equals$$Object: function (o){ @@ -2392,10 +2716,14 @@ var System$Guid = { if (a != "d" && a != System.String.Empty){ throw $CreateException(new System.FormatException.ctor$$String("Argument to Guid.ToString(string format) should be \"b\", \"B\", \"d\", \"D\", \"n\", \"N\", \"p\" or \"P\""), new Error()); } + else + null; } } } } + else + null; return this.BaseToString(h, p, b); }, ToString$$String$$IFormatProvider: function (format, provider){ @@ -2461,10 +2789,14 @@ var System$Int64 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -2504,6 +2836,8 @@ Date.prototype.CompareTo = function (value){ Date.prototype.get_Year = function (){ if (this._Kind == 1) return this.getUTCFullYear(); + else + null; return this.getFullYear(); }; Date.prototype.set_Year = function (value){ @@ -2515,6 +2849,8 @@ Date.prototype.set_Year = function (value){ Date.prototype.get_Month = function (){ if (this._Kind == 1) return this.getUTCMonth() + 1; + else + null; return this.getMonth() + 1; }; Date.prototype.set_Month = function (value){ @@ -2526,6 +2862,8 @@ Date.prototype.set_Month = function (value){ Date.prototype.get_Day = function (){ if (this._Kind == 1) return this.getUTCDate(); + else + null; return this.getDate(); }; Date.prototype.set_Day = function (value){ @@ -2537,6 +2875,8 @@ Date.prototype.set_Day = function (value){ Date.prototype.get_Hour = function (){ if (this._Kind == 1) return this.getUTCHours(); + else + null; return this.getHours(); }; Date.prototype.set_Hour = function (value){ @@ -2548,6 +2888,8 @@ Date.prototype.set_Hour = function (value){ Date.prototype.get_Minute = function (){ if (this._Kind == 1) return this.getUTCMinutes(); + else + null; return this.getMinutes(); }; Date.prototype.set_Minute = function (value){ @@ -2559,6 +2901,8 @@ Date.prototype.set_Minute = function (value){ Date.prototype.get_Second = function (){ if (this._Kind == 1) return this.getUTCSeconds(); + else + null; return this.getSeconds(); }; Date.prototype.set_Second = function (value){ @@ -2570,6 +2914,8 @@ Date.prototype.set_Second = function (value){ Date.prototype.get_Millisecond = function (){ if (this._Kind == 1) return this.getUTCMilliseconds(); + else + null; return this.getMilliseconds(); }; Date.prototype.set_Millisecond = function (value){ @@ -2581,6 +2927,8 @@ Date.prototype.set_Millisecond = function (value){ Date.prototype.get_Ticks = function (){ if (this._Kind == 1) return this.getUTCMilliseconds() * 10000; + else + null; return this.getMilliseconds() * 10000; }; Date.prototype.set_Ticks = function (value){ @@ -2596,6 +2944,8 @@ Date.prototype.get_DayOfWeek = function (){ Date.prototype.ToLocalTime = function (){ if (this._Kind != 1) return this; + else + null; var x = this.Clone(); x._Kind = 2; return x; @@ -2603,6 +2953,8 @@ Date.prototype.ToLocalTime = function (){ Date.prototype.ToUniversalTime = function (){ if (this._Kind == 1) return this; + else + null; var x = this.Clone(); x._Kind = 1; return x; @@ -2687,6 +3039,8 @@ Date.prototype.RemoveTime = function (){ Date.prototype.Equals$$Object = function (obj){ if (obj == null) return false; + else + null; return obj.valueOf() == this.valueOf(); }; Date.prototype.GetHashCode = function (){ @@ -2698,22 +3052,34 @@ Date.prototype.GetType = function (){ Date.prototype.get_Kind = function (){ if (this._Kind == null) return 2; + else + null; return this._Kind; }; Number.prototype.CompareTo$$Double = function (value){ if (this < value) return -1; + else + null; if (this > value) return 1; + else + null; if (this == value) return 0; + else + null; if (!System.Double.IsNaN(this)) return 1; + else + null; return !System.Double.IsNaN(value) ? -1 : 0; }; Number.prototype.CompareTo$$Int32 = function (value){ if (this < value) return -1; + else + null; return this > value ? 1 : 0; }; var System$Nullable$1 = { @@ -2739,6 +3105,8 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ throw $CreateException(new System.InvalidOperationException.ctor$$String("InvalidOperation_NoValue"), new Error()); } + else + null; return this.value; }, GetValueOrDefault: function (){ @@ -2748,27 +3116,37 @@ var System$Nullable$1 = { if (!this.get_HasValue()){ return defaultValue; } + else + null; return this.value; }, Equals$$Object: function (other){ if (!this.get_HasValue()){ return (other == null); } + else + null; if (other == null){ return false; } + else + null; return this.value.Equals$$Object(other); }, GetHashCode: function (){ if (!this.get_HasValue()){ return 0; } + else + null; return this.value.GetHashCode(); }, toString: function (){ if (!this.get_HasValue()){ return ""; } + else + null; return this.value.toString(); } } @@ -2808,6 +3186,8 @@ var System$Random = { if (num2 < 0){ num2 += 2147483647; } + else + null; num = this.SeedArray[num3]; } for (var j = 1; j < 5; j++){ @@ -2816,6 +3196,8 @@ var System$Random = { if (this.SeedArray[k] < 0){ this.SeedArray[k] += 2147483647; } + else + null; } } this.inext = 0; @@ -2831,13 +3213,19 @@ var System$Random = { if (++num >= 56){ num = 1; } + else + null; if (++num2 >= 56){ num2 = 1; } + else + null; var num3 = this.SeedArray[num] - this.SeedArray[num2]; if (num3 < 0){ num3 += 2147483647; } + else + null; this.SeedArray[num] = num3; this.inext = num; this.inextp = num2; @@ -2852,6 +3240,8 @@ var System$Random = { if (flag){ num = -num; } + else + null; var num2 = num; num2 += 2147483646; return num2 / 4294967293; @@ -2860,16 +3250,22 @@ var System$Random = { if (minValue > maxValue){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("minValue", "Argument_MinMaxValue"), new Error()); } + else + null; var num = maxValue - minValue; if (num <= 2147483647){ return (this.Sample() * num) + minValue; } + else + null; return ((this.GetSampleForLargeRange() * num) + minValue); }, Next$$Int32: function (maxValue){ if (maxValue < 0){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("maxValue", "ArgumentOutOfRange_MustBePositive"), new Error()); } + else + null; return (this.Sample() * maxValue); }, NextDouble: function (){ @@ -2879,6 +3275,8 @@ var System$Random = { if (buffer == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("buffer"), new Error()); } + else + null; for (var i = 0; i < buffer.length; i++){ buffer[i] = (this.InternalSample() % 256); } @@ -2939,6 +3337,8 @@ var System$CharEnumerator = { this.currentElement = this.str.charAt(this.index); return true; } + else + null; this.index = this.str.length; return false; }, @@ -2951,9 +3351,13 @@ var System$CharEnumerator = { if (this.index == -1){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Not Started"), new Error()); } + else + null; if (this.index >= this.str.length){ throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Ended"), new Error()); } + else + null; return this.currentElement; } } @@ -3004,9 +3408,13 @@ var System$TimeSpan = { if (t1.get__ticks() > t2.get__ticks()){ return 1; } + else + null; if (t1.get__ticks() < t2.get__ticks()){ return -1; } + else + null; return 0; }, FromDays: function (value){ @@ -3022,11 +3430,15 @@ var System$TimeSpan = { if (System.Double.IsNaN(value)){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_CannotBeNaN"), new Error()); } + else + null; var num = value * scale; var num2 = num + ((value >= 0) ? 0.5 : -0.5); if (num2 > 922337203685477 || num2 < -922337203685477){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((num2 * 10000)); }, FromMilliseconds: function (value){ @@ -3048,6 +3460,8 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 10000000; }, TimeToMs: function (hour, minute, second){ @@ -3055,12 +3469,16 @@ var System$TimeSpan = { if (num > 922337203685 || num < -922337203685){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; return num * 1000; }, op_UnaryNegation: function (t){ if (t.get__ticks() == System.TimeSpan.MinValue.get__ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-t.get__ticks()); }, op_Subtraction: function (t1, t2){ @@ -3167,6 +3585,8 @@ var System$TimeSpan = { if (num > 922337203685477 || num < -922337203685477){ throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null, "Overflow_TimeSpanTooLong"), new Error()); } + else + null; this._TotalMilliseconds = num; }, Add: function (ts){ @@ -3177,16 +3597,24 @@ var System$TimeSpan = { if (value == null){ return 1; } + else + null; if (!(Is(value, System.TimeSpan.ctor))){ throw $CreateException(new System.ArgumentException.ctor$$String("Arg_MustBeTimeSpan"), new Error()); } + else + null; var ticks = (Cast(value, System.TimeSpan.ctor)).get__ticks(); if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, CompareTo$$TimeSpan: function (value){ @@ -3194,15 +3622,21 @@ var System$TimeSpan = { if (this.get__ticks() > ticks){ return 1; } + else + null; if (this.get__ticks() < ticks){ return -1; } + else + null; return 0; }, Duration: function (){ if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_Duration"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64((this.get__ticks() >= 0) ? this.get__ticks() : (-this.get__ticks())); }, Equals$$Object: function (value){ @@ -3218,6 +3652,8 @@ var System$TimeSpan = { if (this.get_Ticks() == System.TimeSpan.MinValue.get_Ticks()){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(-this.get__ticks()); }, Subtract: function (ts){ @@ -3225,6 +3661,8 @@ var System$TimeSpan = { if (this.get__ticks() >> 63 != ts.get__ticks() >> 63 && this.get__ticks() >> 63 != num >> 63){ throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"), new Error()); } + else + null; return new System.TimeSpan.ctor$$Int64(num); } } @@ -3574,10 +4012,14 @@ var System$UInt32 = { Convert: function (value){ if (value == null) throw $CreateException(new System.ArgumentNullException.ctor(), new Error()); + else + null; var regex = new RegExp("^-?([0-9]+)[^0-9]"); var match = regex.exec(value.toString()); if (match == null) throw $CreateException(new System.FormatException.ctor(), new Error()); + else + null; return new Number(match[1]); } } @@ -3591,12 +4033,18 @@ var System$Uri = { if (u1 == u2){ return true; } + else + null; if (u1 == null){ return false; } + else + null; if (u2 == null){ return false; } + else + null; return u1._OriginalString == u2._OriginalString; }, op_Inequality: function (u1, u2){ @@ -3646,6 +4094,8 @@ var System$Uri = { else this._Fragment = this._OriginalString.substr(idx); } + else + null; return this._Fragment; }, Query$$: "System.String", @@ -3662,6 +4112,8 @@ var System$Uri = { this._Query = this._OriginalString.substr(idx, idx2 - idx); } } + else + null; return this._Query; } } @@ -4554,6 +5006,8 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; System.IO.Path.CheckInvalidPathChars(path); var str = path; var length = path.length; @@ -4563,30 +5017,44 @@ var System$IO$Path = { str = path.substr(0, length); break; } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } if ((extension == null) || (path.length == 0)){ return str; } + else + null; if ((extension.length == 0) || (extension.charAt(0) != ".")){ str = str + "."; } + else + null; return (str + extension); }, CharArrayStartsWithOrdinal: function (array, numChars, compareTo, ignoreCase){ if (numChars < compareTo.length){ return false; } + else + null; if (ignoreCase){ var str = new System.String.ctor$$Char$Array$$Int32$$Int32(array, 0, compareTo.length); return compareTo.Equals$$String$$StringComparison(str, 5); } + else + null; for (var i = 0; i < compareTo.length; i++){ if (array[i] != compareTo.charAt(i)){ return false; } + else + null; } return true; }, @@ -4596,17 +5064,23 @@ var System$IO$Path = { if (((num2 == 34) || (num2 == 60)) || (((num2 == 62) || (num2 == 124)) || (num2 < 32))){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Argument_InvalidPathChars")), new Error()); } + else + null; } }, CheckSearchPattern: function (searchPattern){ - var num; + var num = null; while ((num = searchPattern.indexOf("..", 4)) != -1){ if ((num + 2) == searchPattern.length){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Arg_InvalidSearchPattern")), new Error()); } + else + null; if ((searchPattern.charAt(num + 2) == System.IO.Path.DirectorySeparatorChar) || (searchPattern.charAt(num + 2) == System.IO.Path.AltDirectorySeparatorChar)){ throw $CreateException(new System.ArgumentException.ctor$$String(System.Environment.GetResourceString("Arg_InvalidSearchPattern")), new Error()); } + else + null; searchPattern = searchPattern.substr(num + 2); } }, @@ -4614,21 +5088,31 @@ var System$IO$Path = { if ((path1 == null) || (path2 == null)){ throw $CreateException(new System.ArgumentNullException.ctor$$String((path1 == null) ? "path1" : "path2"), new Error()); } + else + null; System.IO.Path.CheckInvalidPathChars(path1); System.IO.Path.CheckInvalidPathChars(path2); if (path2.length == 0){ return path1; } + else + null; if (path1.length == 0){ return path2; } + else + null; if (System.IO.Path.IsPathRooted(path2)){ return path2; } + else + null; var ch = path1.charAt(path1.length - 1); if (((ch != System.IO.Path.DirectorySeparatorChar) && (ch != System.IO.Path.AltDirectorySeparatorChar)) && (ch != System.IO.Path.VolumeSeparatorChar)){ return (path1 + System.IO.Path.DirectorySeparatorChar + path2); } + else + null; return (path1 + path2); }, FixupPath: function (path){ @@ -4644,17 +5128,25 @@ var System$IO$Path = { if (length == rootLength){ return null; } + else + null; while (((length > rootLength) && (path.charAt(--length) != System.IO.Path.DirectorySeparatorChar)) && (path.charAt(length) != System.IO.Path.AltDirectorySeparatorChar)){ } return path.substr(0, length); } + else + null; } + else + null; return null; }, GetExtension: function (path){ if (path == null){ return null; } + else + null; System.IO.Path.CheckInvalidPathChars(path); var length = path.length; var startIndex = length; @@ -4664,11 +5156,17 @@ var System$IO$Path = { if (startIndex != (length - 1)){ return path.substr(startIndex, length - startIndex); } + else + null; return System.String.Empty; } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } return System.String.Empty; }, @@ -4682,8 +5180,12 @@ var System$IO$Path = { if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ return path.substr(num2 + 1, (length - num2) - 1); } + else + null; } } + else + null; return path; }, GetFileNameWithoutExtension: function (path){ @@ -4691,10 +5193,14 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; var length = path.lastIndexOf("."); if (length == -1){ return path; } + else + null; return path.substr(0, length); }, GetFullPath: function (path){ @@ -4705,6 +5211,8 @@ var System$IO$Path = { if (path == null){ throw $CreateException(new System.ArgumentNullException.ctor$$String("path"), new Error()); } + else + null; return System.IO.Path.NormalizePath(path, true); }, GetInvalidFileNameChars: function (){ @@ -4717,6 +5225,8 @@ var System$IO$Path = { if (path == null){ return null; } + else + null; path = System.IO.Path.FixupPath(path); return path.substr(0, System.IO.Path.GetRootLength(path)); }, @@ -4736,14 +5246,22 @@ var System$IO$Path = { num++; } } + else + null; return num; } + else + null; if ((length >= 2) && (path.charAt(1) == System.IO.Path.VolumeSeparatorChar)){ num = 2; if ((length >= 3) && System.IO.Path.IsDirectorySeparator(path.charAt(2))){ num++; } + else + null; } + else + null; return num; }, GetTempFileName: function (){ @@ -4761,39 +5279,57 @@ var System$IO$Path = { if (ch == "."){ return (length != (path.length - 1)); } + else + null; if (((ch == System.IO.Path.DirectorySeparatorChar) || (ch == System.IO.Path.AltDirectorySeparatorChar)) || (ch == System.IO.Path.VolumeSeparatorChar)){ break; } + else + null; } } + else + null; return false; }, InternalCombine: function (path1, path2){ if ((path1 == null) || (path2 == null)){ throw $CreateException(new System.ArgumentNullException.ctor$$String((path1 == null) ? "path1" : "path2"), new Error()); } + else + null; System.IO.Path.CheckInvalidPathChars(path1); System.IO.Path.CheckInvalidPathChars(path2); if (path2.length == 0){ throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Argument_PathEmpty"), "path2"), new Error()); } + else + null; if (System.IO.Path.IsPathRooted(path2)){ throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Arg_Path2IsRooted"), "path2"), new Error()); } + else + null; var length = path1.length; if (length == 0){ return path2; } + else + null; var ch = path1.charAt(length - 1); if (((ch != System.IO.Path.DirectorySeparatorChar) && (ch != System.IO.Path.AltDirectorySeparatorChar)) && (ch != System.IO.Path.VolumeSeparatorChar)){ return (path1 + System.IO.Path.DirectorySeparatorChar + path2); } + else + null; return (path1 + path2); }, IsDirectorySeparator: function (c){ if (c != System.IO.Path.DirectorySeparatorChar){ return (c == System.IO.Path.AltDirectorySeparatorChar); } + else + null; return true; }, IsPathRooted: function (path){ @@ -4803,7 +5339,11 @@ var System$IO$Path = { if (((length >= 1) && ((path.charAt(0) == System.IO.Path.DirectorySeparatorChar) || (path.charAt(0) == System.IO.Path.AltDirectorySeparatorChar))) || ((length >= 2) && (path.charAt(1) == System.IO.Path.VolumeSeparatorChar))){ return true; } + else + null; } + else + null; return false; }, NormalizePath: function (path, fullCheck){ @@ -4843,11 +5383,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() > 0){ return list.get_Item$$Int32(0); } + else + null; } else { var enumerator = source.GetEnumerator(); @@ -4855,6 +5399,8 @@ var System$Linq$Enumerable = { if (enumerator.MoveNext()){ return enumerator.get_Current(); } + else + null; } finally{ enumerator.Dispose(); @@ -4866,15 +5412,21 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it5 = source.GetEnumerator(); while ($it5.MoveNext()){ var local = $it5.get_Current(); if (predicate(local)){ return local; } + else + null; } throw $CreateException(System.Linq.Error.NoMatch(), new Error()); }, @@ -4882,11 +5434,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() > 0){ return list.get_Item$$Int32(0); } + else + null; } else { var enumerator = source.GetEnumerator(); @@ -4894,6 +5450,8 @@ var System$Linq$Enumerable = { if (enumerator.MoveNext()){ return enumerator.get_Current(); } + else + null; } finally{ enumerator.Dispose(); @@ -4905,21 +5463,29 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it6 = source.GetEnumerator(); while ($it6.MoveNext()){ var local = $it6.get_Current(); if (predicate(local)){ return local; } + else + null; } return Default(TSource); }, Single$1$$IEnumerable$1: function (TSource, source){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() == 1) @@ -4932,6 +5498,8 @@ var System$Linq$Enumerable = { try{ if (enumerator.MoveNext()) return enumerator.get_Current(); + else + null; } finally{ enumerator.Dispose(); @@ -4942,19 +5510,27 @@ var System$Linq$Enumerable = { Single$1$$IEnumerable$1$$Func$2: function (TSource, source, predicate){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; if (predicate == null) throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); + else + null; var $it7 = source.GetEnumerator(); while ($it7.MoveNext()){ var local = $it7.get_Current(); if (predicate(local)) return local; + else + null; } throw $CreateException(System.Linq.Error.NoMatch(), new Error()); }, SingleOrDefault$1$$IEnumerable$1: function (TSource, source){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ if (list.get_Count() == 1) @@ -4967,6 +5543,8 @@ var System$Linq$Enumerable = { try{ if (enumerator.MoveNext()) return enumerator.get_Current(); + else + null; } finally{ enumerator.Dispose(); @@ -4977,13 +5555,19 @@ var System$Linq$Enumerable = { SingleOrDefault$1$$IEnumerable$1$$Func$2: function (TSource, source, predicate){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; if (predicate == null) throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); + else + null; var $it8 = source.GetEnumerator(); while ($it8.MoveNext()){ var local = $it8.get_Current(); if (predicate(local)) return local; + else + null; } return Default(TSource); }, @@ -4991,24 +5575,30 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ var count = list.get_Count(); if (count > 0){ return list.get_Item$$Int32(count - 1); } + else + null; } else { var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ - var current; + var current = null; do{ current = enumerator.get_Current(); } while (enumerator.MoveNext()) return current; } + else + null; } finally{ enumerator.Dispose(); @@ -5020,9 +5610,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var local = Default(TSource); var flag = false; var $it9 = source.GetEnumerator(); @@ -5032,34 +5626,44 @@ var System$Linq$Enumerable = { local = local2; flag = true; } + else + null; } if (!flag){ throw $CreateException(System.Linq.Error.NoMatch(), new Error()); } + else + null; return local; }, LastOrDefault$1$$IEnumerable$1: function (TSource, source){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var list = As(source, System.Collections.Generic.IList$1.ctor); if (list != null){ var count = list.get_Count(); if (count > 0){ return list.get_Item$$Int32(count - 1); } + else + null; } else { var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ - var current; + var current = null; do{ current = enumerator.get_Current(); } while (enumerator.MoveNext()) return current; } + else + null; } finally{ enumerator.Dispose(); @@ -5071,9 +5675,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var local = Default(TSource); var $it10 = source.GetEnumerator(); while ($it10.MoveNext()){ @@ -5081,6 +5689,8 @@ var System$Linq$Enumerable = { if (predicate(local2)){ local = local2; } + else + null; } return local; }, @@ -5088,43 +5698,63 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; if (Is(source, System.Linq.Enumerable.Iterator.ctor)){ return (Cast(source, System.Linq.Enumerable.Iterator.ctor)).Where(predicate); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.WhereArrayIterator.ctor(TSource, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), predicate); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.WhereListIterator.ctor(TSource, Cast(source, System.Collections.Generic.List$1.ctor), predicate); } + else + null; return new System.Linq.Enumerable.WhereEnumerableIterator.ctor(TSource, source, predicate); }, Where$1$$IEnumerable$1$$Func$3: function (TSource, source, predicate){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; throw $CreateException(new System.NotImplementedException.ctor(), new Error()); }, Contains$1$$IEnumerable$1$$TSource: function (TSource, source, value){ if (source == null) throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); + else + null; var is2 = As(source, System.Collections.Generic.ICollection$1.ctor); if (is2 != null) return is2.Contains(value); + else + null; var $it11 = source.GetEnumerator(); while ($it11.MoveNext()){ var local = $it11.get_Current(); if (local == value) return true; + else + null; } return false; }, @@ -5132,15 +5762,21 @@ var System$Linq$Enumerable = { if (comparer == null){ return System.Linq.Enumerable.Contains$1$$IEnumerable$1$$TSource(TSource, source, value); } + else + null; if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var $it12 = source.GetEnumerator(); while ($it12.MoveNext()){ var local = $it12.get_Current(); if (comparer.Equals$$T$$T(local, value)){ return true; } + else + null; } return false; }, @@ -5148,11 +5784,15 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var enumerator = source.GetEnumerator(); try{ if (enumerator.MoveNext()){ return true; } + else + null; } finally{ enumerator.Dispose(); @@ -5163,15 +5803,21 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var $it13 = source.GetEnumerator(); while ($it13.MoveNext()){ var local = $it13.get_Current(); if (predicate(local)){ return true; } + else + null; } return false; }, @@ -5179,19 +5825,27 @@ var System$Linq$Enumerable = { if (first == null){ throw $CreateException(System.Linq.Error.ArgumentNull("first"), new Error()); } + else + null; if (second == null){ throw $CreateException(System.Linq.Error.ArgumentNull("second"), new Error()); } + else + null; return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerable$1.ctor(TSource, first, second); }, Count$1$$IEnumerable$1: function (TSource, source){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var is2 = As(source, System.Collections.Generic.ICollection$1.ctor); if (is2 != null){ return is2.get_Count(); } + else + null; var num = 0; var enumerator = source.GetEnumerator(); try{ @@ -5208,9 +5862,13 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (predicate == null){ throw $CreateException(System.Linq.Error.ArgumentNull("predicate"), new Error()); } + else + null; var num = 0; var $it14 = source.GetEnumerator(); while ($it14.MoveNext()){ @@ -5218,6 +5876,8 @@ var System$Linq$Enumerable = { if (predicate(local)){ num++; } + else + null; } return num; }, @@ -5225,6 +5885,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return new System.Linq.Enumerable.OfTypeIterator.ctor(TResult, source); }, OrderBy$2$$IEnumerable$1$$Func$2: function (TSource, TKey, source, keySelector){ @@ -5243,45 +5905,63 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, null, false); }, ThenBy$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1: function (TSource, TKey, source, keySelector, comparer){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, comparer, false); }, ThenByDescending$2$$IOrderedEnumerable$1$$Func$2: function (TSource, TKey, source, keySelector){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, null, true); }, ThenByDescending$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1: function (TSource, TKey, source, keySelector, comparer){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return source.CreateOrderedEnumerable$1(TKey, keySelector, comparer, true); }, Select$2$$IEnumerable$1$$Func$2: function (TSource, TResult, source, selector){ if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (selector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("selector"), new Error()); } + else + null; if (Is(source, System.Linq.Enumerable.Iterator.ctor)){ return (Cast(source, System.Linq.Enumerable.Iterator.ctor)).Select$1(TResult, selector); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.WhereSelectArrayIterator.ctor(TSource, TResult, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), null, selector); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.WhereSelectListIterator.ctor(TSource, TResult, Cast(source, System.Collections.Generic.List$1.ctor), null, selector); } + else + null; return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(TSource, TResult, source, null, selector); }, Select$2$$IEnumerable$1$$Func$3: function (TSource, TResult, source, selector){ @@ -5291,18 +5971,26 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (selector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("selector"), new Error()); } + else + null; if (source instanceof Array){ return new System.Linq.Enumerable.SelectManyArrayIterator.ctor(TSource, TResult, source instanceof Array || source == null ? source : (function (){ throw new Error("InvalidCastException"); } ()), selector); } + else + null; if (Is(source, System.Collections.Generic.List$1.ctor)){ return new System.Linq.Enumerable.SelectManyListIterator.ctor(TSource, TResult, Cast(source, System.Collections.Generic.List$1.ctor), selector); } + else + null; return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(TSource, TResult, source, selector); }, SelectMany$2$$IEnumerable$1$$Func$3: function (TSource, TResult, source, selector){ @@ -5312,12 +6000,18 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; if (collectionSelector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("collectionSelector"), new Error()); } + else + null; if (resultSelector == null){ throw $CreateException(System.Linq.Error.ArgumentNull("resultSelector"), new Error()); } + else + null; return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(System.Tuple$2.ctor, TResult, System.Linq.Enumerable.SelectMany$2$$IEnumerable$1$$Func$2(TSource, System.Tuple$2.ctor, source, function (t){ return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(TCollection, System.Tuple$2.ctor, collectionSelector(t), function (x){ return System.Tuple.Create$2$$T1$$T2(TSource, TCollection, t, x); @@ -5330,6 +6024,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var x = new System.Linq.Enumerable.SkipIterator.ctor(TSource, source, count); return x; }, @@ -5337,6 +6033,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var x = new System.Linq.Enumerable.TakeIterator.ctor(TSource, source, count); return x; }, @@ -5344,6 +6042,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; var arr = []; var $it15 = source.GetEnumerator(); while ($it15.MoveNext()){ @@ -5356,6 +6056,8 @@ var System$Linq$Enumerable = { if (source == null){ throw $CreateException(System.Linq.Error.ArgumentNull("source"), new Error()); } + else + null; return new System.Collections.Generic.List$1.ctor$$IEnumerable$1(TSource, source); } }, @@ -5491,6 +6193,8 @@ var System$Linq$_OrderedEnumerable$1 = { GetEnumerator: function (){ if (this.sorted == null) this.sorted = this.SortSource(); + else + null; return this.sorted.GetEnumerator(); }, SortSource: function (){ @@ -5525,9 +6229,13 @@ var System$Linq$_OrderedEnumerable$2 = { if (source == null){ throw $CreateException(System.Linq._Error.ArgumentNull("source"), new Error()); } + else + null; if (keySelector == null){ throw $CreateException(System.Linq._Error.ArgumentNull("keySelector"), new Error()); } + else + null; this.source = source; this.keySelector = keySelector; this.comparer = ((comparer != null) ? comparer : System.Collections.Generic.Comparer$1.get_Default()); @@ -5538,12 +6246,18 @@ var System$Linq$_OrderedEnumerable$2 = { var z = this.parent.Compare(x, y); if (z != 0) return z; + else + null; } + else + null; var xx = this.keySelector(x); var yy = this.keySelector(y); var zz = this.comparer.Compare(xx, yy); if (this.descending) zz *= -1; + else + null; return zz; } } @@ -5575,6 +6289,8 @@ var System$Linq$Enumerable$Iterator = { this.state = 1; return this; } + else + null; var iterator = this.Clone(); iterator.state = 1; return iterator; @@ -5606,6 +6322,8 @@ var System$Linq$Enumerable$SelectManyEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -5635,6 +6353,8 @@ var System$Linq$Enumerable$SelectManyEnumerableIterator = { this.current = this.innerEnumerator.get_Current(); return true; } + else + null; this.innerEnumerator = null; } } @@ -5677,16 +6397,22 @@ var System$Linq$Enumerable$SelectManyListIterator = { var innerEnumerable = this.selector(arg); this.innerEnumerator = innerEnumerable.GetEnumerator(); } + else + null; var hadNext = this.innerEnumerator.MoveNext(); if (!hadNext){ this.innerEnumerator = null; continue; } + else + null; this.current = this.innerEnumerator.get_Current(); return true; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ @@ -5725,9 +6451,13 @@ var System$Linq$Enumerable$WhereArrayIterator = { this.current = tSource; return true; } + else + null; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult, selector){ @@ -5761,6 +6491,8 @@ var System$Linq$Enumerable$WhereEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -5781,6 +6513,8 @@ var System$Linq$Enumerable$WhereEnumerableIterator = { this.current = current; return true; } + else + null; } this.Dispose(); return false; @@ -5829,6 +6563,8 @@ var System$Linq$Enumerable$WhereListIterator = { this.current = current; return true; } + else + null; } this.Dispose(); return false; @@ -5872,9 +6608,13 @@ var System$Linq$Enumerable$WhereSelectArrayIterator = { this.current = this.selector(arg); return true; } + else + null; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ @@ -5911,6 +6651,8 @@ var System$Linq$Enumerable$WhereSelectEnumerableIterator = { if (this.enumerator != null){ this.enumerator.Dispose(); } + else + null; this.enumerator = null; System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this); }, @@ -5931,6 +6673,8 @@ var System$Linq$Enumerable$WhereSelectEnumerableIterator = { this.current = this.selector(current); return true; } + else + null; } this.Dispose(); return false; @@ -5982,6 +6726,8 @@ var System$Linq$Enumerable$WhereSelectListIterator = { this.current = this.selector(current); return true; } + else + null; } this.Dispose(); return false; @@ -6012,6 +6758,8 @@ var System$Linq$Enumerable$OfTypeIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -6020,12 +6768,18 @@ var System$Linq$Enumerable$OfTypeIterator = { MoveNext: function (){ if (this.SourceEnumerator == null) this.SourceEnumerator = this.Source.GetEnumerator(); + else + null; while (true){ if (!this.SourceEnumerator.MoveNext()) return false; + else + null; var item = this.SourceEnumerator.get_Current(); if (Is(item, this.T)) return true; + else + null; } }, Dispose: function (){ @@ -6058,6 +6812,8 @@ var System$Linq$Enumerable$SkipIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -6068,16 +6824,24 @@ var System$Linq$Enumerable$SkipIterator = { this.SourceEnumerator = this.Source.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ for (var i = 0; i < this.SkipCount; i++){ if (!this.SourceEnumerator.MoveNext()) return false; + else + null; } this.State = 2; } + else + null; if (this.State == 2){ return this.SourceEnumerator.MoveNext(); } + else + null; return false; }, Dispose: function (){ @@ -6087,6 +6851,8 @@ var System$Linq$Enumerable$SkipIterator = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new System.Linq.Enumerable.SkipIterator.ctor(this.T, this.Source, this.SkipCount); } } @@ -6113,6 +6879,8 @@ var System$Linq$Enumerable$TakeIterator = { Reset: function (){ if (this.SourceEnumerator != null) this.SourceEnumerator.Reset(); + else + null; }, Current$$: "`0", get_Current: function (){ @@ -6123,15 +6891,23 @@ var System$Linq$Enumerable$TakeIterator = { this.SourceEnumerator = this.Source.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ if (this.SourceEnumerator.MoveNext()){ this.TakeIndex++; if (this.TakeIndex <= this.TakeCount) return true; + else + null; } + else + null; this.State = 2; return false; } + else + null; return false; }, Dispose: function (){ @@ -6141,6 +6917,8 @@ var System$Linq$Enumerable$TakeIterator = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new System.Linq.Enumerable.TakeIterator.ctor(this.T, this.Source, this.TakeCount); } } @@ -6189,8 +6967,12 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { Reset: function (){ if (this.FirstEnumerator != null) this.FirstEnumerator.Reset(); + else + null; if (this.SecondEnumerator != null) this.SecondEnumerator.Reset(); + else + null; this.onFirst = true; }, Current$$: "`0", @@ -6198,9 +6980,13 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { if (this.State == 1){ return this.FirstEnumerator.get_Current(); } + else + null; if (this.State == 3){ return this.SecondEnumerator.get_Current(); } + else + null; throw $CreateException(new System.InvalidOperationException.ctor(), new Error()); }, MoveNext: function (){ @@ -6208,22 +6994,34 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { this.FirstEnumerator = this.First.GetEnumerator(); this.State = 1; } + else + null; if (this.State == 1){ if (this.FirstEnumerator.MoveNext()){ return true; } + else + null; this.State = 2; } + else + null; if (this.State == 2){ this.SecondEnumerator = this.Second.GetEnumerator(); this.State = 3; } + else + null; if (this.State == 3){ if (this.SecondEnumerator.MoveNext()){ return true; } + else + null; this.State = 4; } + else + null; return false; }, Dispose: function (){ @@ -6235,6 +7033,8 @@ var SharpKit$JavaScript$Private$Enumerable$ConcatEnumerator$1 = { GetEnumerator: function (){ if (this.State == 0) return this; + else + null; return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerator$1.ctor(this.T, this.First, this.Second); } } @@ -6269,16 +7069,22 @@ var System$Linq$Enumerable$SelectManyArrayIterator = { var innerEnumerable = this.selector(arg); this.innerEnumerator = innerEnumerable.GetEnumerator(); } + else + null; var hadNext = this.innerEnumerator.MoveNext(); if (!hadNext){ this.innerEnumerator = null; continue; } + else + null; this.current = this.innerEnumerator.get_Current(); return true; } this.Dispose(); } + else + null; return false; }, Select$1: function (TResult2, selector){ @@ -6340,13 +7146,19 @@ var System$Collections$Generic$Dictionary$2 = { GetHashKey: function (key){ if (this.Comparer != null) return this.Comparer.GetHashCode$$T(key); + else + null; return SharpKit.JavaScript.Utils.Js.GetHashKey(key); }, Add: function (key, value){ if (key == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("key"), new Error()); + else + null; if (this.ContainsKey(key)) throw $CreateException(new System.ArgumentException.ctor$$String$$String$$Exception("The specified key already exists.", "key", null), new Error()); + else + null; var hashKey = this.GetHashKey(key); this._table[hashKey] = value; this._keys[hashKey] = key; @@ -6355,6 +7167,8 @@ var System$Collections$Generic$Dictionary$2 = { Remove: function (key){ if (key == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("key"), new Error()); + else + null; var result = this.ContainsKey(key); var hashKey = this.GetHashKey(key); delete this._table[hashKey]; @@ -6366,6 +7180,8 @@ var System$Collections$Generic$Dictionary$2 = { get_Item$$TKey: function (key){ if (!this.ContainsKey(key)) throw $CreateException(new System.Collections.Generic.KeyNotFoundException.ctor$$String("The specified key does not exist."), new Error()); + else + null; var hashKey = this.GetHashKey(key); return this._table[hashKey]; }, @@ -6407,7 +7223,7 @@ var System$Collections$Generic$Dictionary$2 = { this._keys = new Object(); this._table = new Object(); this._version++; - return; + return null; } }, TryGetValue: function (key, value){ @@ -6452,12 +7268,16 @@ var System$Collections$Generic$HashSet$1 = { GetHashKey: function (key){ if (this.Comparer != null) return this.Comparer.GetHashCode$$T(key); + else + null; return SharpKit.JavaScript.Utils.Js.GetHashKey(key); }, Add: function (item){ var key = this.GetHashKey(item); if (this.Hashtable[key] != null) return false; + else + null; this.Hashtable[key] = item; this._Count++; return true; @@ -6508,6 +7328,8 @@ var System$Collections$Generic$HashSet$1 = { var key = this.GetHashKey(item); if (this.Hashtable[key] === item) return true; + else + null; return false; }, CopyTo: function (array, arrayIndex){ @@ -6520,6 +7342,8 @@ var System$Collections$Generic$HashSet$1 = { this._Count--; return true; } + else + null; return false; }, GetEnumerator: function (){ @@ -6543,6 +7367,8 @@ var System$StringComparer = { get_InvariantCultureIgnoreCase: function (){ if (System.StringComparer._InvariantCultureIgnoreCase == null) System.StringComparer._InvariantCultureIgnoreCase = new SharpKit.JavaScript.Private.StringComparer_InvariantCultureIgnoreCase.ctor(); + else + null; return System.StringComparer._InvariantCultureIgnoreCase; } }, @@ -6572,13 +7398,19 @@ var SharpKit$JavaScript$Private$StringComparer_InvariantCultureIgnoreCase = { Equals$$T$$T: function (x, y){ if (x == y) return true; + else + null; if (x == null || y == null) return false; + else + null; return x.toLowerCase() == y.toLowerCase(); }, GetHashCode$$T: function (obj){ if (obj == null) return "null"; + else + null; return obj.toLowerCase(); } } @@ -6653,11 +7485,15 @@ var System$Collections$Generic$List$1 = { get_Item$$Int32: function (index){ if (index >= this._list.length || index < 0) throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"), new Error()); + else + null; return this._list[index]; }, set_Item$$Int32: function (index, value){ if (index >= this._list.length || index < 0) throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"), new Error()); + else + null; this._list[index] = value; }, Count$$: "System.Int32", @@ -6688,6 +7524,8 @@ var System$Collections$Generic$List$1 = { var index = this._list.indexOf(item); if (index == -1) return false; + else + null; this._list.RemoveAt(index); return true; }, @@ -6698,6 +7536,8 @@ var System$Collections$Generic$List$1 = { this.Clear(); if (items != null) this.AddRange(items); + else + null; }, IndexOf: function (item){ return this._list.indexOf(item); @@ -6730,6 +7570,8 @@ var System$Collections$Generic$List$1 = { ForEach: function (action){ if (action == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("action"), new Error()); + else + null; for (var i = 0; i < this._list.length; i++){ action(this._list[i]); } @@ -6785,6 +7627,8 @@ var System$Collections$Generic$Queue$1 = { Dequeue: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot dequeue - queue is empty"), new Error()); + else + null; var item = this._list[0]; this._list.RemoveAt(0); return item; @@ -6792,6 +7636,8 @@ var System$Collections$Generic$Queue$1 = { Peek: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot peek in queue - queue is empty"), new Error()); + else + null; return this._list[0]; }, Contains: function (item){ @@ -6845,11 +7691,15 @@ var System$Collections$Generic$Stack$1 = { Pop: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot pop from stack - stack is empty"), new Error()); + else + null; return this._list.pop(); }, Peek: function (){ if (this._list.length == 0) throw $CreateException(new Error("Cannot peek in stack - stack is empty"), new Error()); + else + null; return this._list[this._list.length - 1]; }, Contains: function (item){ @@ -6902,11 +7752,15 @@ var System$Collections$ObjectModel$Collection$1 = { ConvertItem: function (item){ if (System.Collections.ObjectModel.Collection$1.IsValidItem(item)) return Cast(item, this.T); + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("item"), new Error()); }, CheckWritable: function (items){ if (items.get_IsReadOnly()) throw $CreateException(new System.NotSupportedException.ctor(), new Error()); + else + null; }, IsSynchronized: function (items){ var c = As(items, System.Collections.ICollection.ctor); @@ -6940,6 +7794,8 @@ var System$Collections$ObjectModel$Collection$1 = { System.Object.ctor.call(this); if (items == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("items"), new Error()); + else + null; this.items = items; var l = As(items, System.Collections.ICollection.ctor); }, @@ -6979,6 +7835,8 @@ var System$Collections$ObjectModel$Collection$1 = { var idx = this.IndexOf(item); if (idx == -1) return false; + else + null; this.RemoveItem(idx); return true; }, @@ -7029,6 +7887,8 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { System.Collections.ObjectModel.Collection$1.ctor.call(this, this.T); if (collection == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("collection"), new Error()); + else + null; var $it4 = collection.GetEnumerator(); while ($it4.MoveNext()){ var item = $it4.get_Current(); @@ -7063,6 +7923,8 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { var eh = this.CollectionChanged; if (this.reentrant.get_Busy() && eh != null && eh.GetInvocationList().length > 1) throw $CreateException(new System.InvalidOperationException.ctor$$String("Cannot modify the collection while reentrancy is blocked."), new Error()); + else + null; }, ClearItems: function (){ this.CheckReentrancy(); @@ -7100,11 +7962,15 @@ var System$Collections$ObjectModel$ObservableCollection$1 = { $r1.Dispose(); } } + else + null; }, OnPropertyChanged: function (e){ var eh = this.PropertyChanged; if (eh != null) eh(this, e); + else + null; }, RemoveItem: function (index){ this.CheckReentrancy(); @@ -7137,6 +8003,8 @@ var System$Collections$ObjectModel$ReadOnlyCollection$1 = { System.Object.ctor.call(this); if (list == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("list"), new Error()); + else + null; this.list = list; }, Contains: function (value){ @@ -7199,11 +8067,15 @@ var System$Collections$ObjectModel$ReadOnlyObservableCollection$1 = { var eh = this.CollectionChanged; if (eh != null) eh(this, args); + else + null; }, OnPropertyChanged: function (args){ var eh = this.PropertyChanged; if (eh != null) eh(this, args); + else + null; }, SourceCollection_CollectionChanged: function (sender, e){ this.OnCollectionChanged(e); @@ -7336,13 +8208,21 @@ var System$Reflection$MemberInfo = { var att = this._CustomAttributes[i]; if (attributeType.IsInstanceOfType(att)) list.Add(att); + else + null; } } + else + null; if (inherit){ var bm = this.GetBaseMember(); if (bm != null) bm.AddCustomAttributes(list, attributeType, inherit); + else + null; } + else + null; }, GetCustomAttributes$$Type$$Boolean: function (attributeType, inherit){ var list = new System.Collections.Generic.List$1.ctor(System.Object.ctor); @@ -7352,6 +8232,8 @@ var System$Reflection$MemberInfo = { GetCustomAttributes$$Boolean: function (inherit){ if (inherit) throw $CreateException(new System.NotImplementedException.ctor$$String("GetCustomAttributes with inherit=true is not implemented"), new Error()); + else + null; this.VerifyCustomAttributes(); return this._CustomAttributes; } @@ -7387,15 +8269,17 @@ var System$Reflection$MethodInfo = { return this._IsStatic; }, Invoke: function (obj, parameters){ - var func; + var func = null; if (this._IsStatic) func = this.JsFunction; else { if (obj == null) throw $CreateException(new System.Exception.ctor$$String("Cannot invoke non static method without a target object"), new Error()); + else + null; func = obj[this.JsName]; } - var res; + var res = null; if (parameters == null) res = func.apply(obj); else @@ -7432,6 +8316,8 @@ var System$Reflection$PropertyInfo = { GetValue$$Object$$Object$Array: function (obj, indexes){ if (this._Getter == null) throw $CreateException(new System.Exception.ctor$$String("Property " + this._Name + " doesn\'t have a getter"), new Error()); + else + null; var value = this._Getter.apply(obj, (indexes != null ? indexes : [])); return value; }, @@ -7444,6 +8330,8 @@ var System$Reflection$PropertyInfo = { SetValue$$Object$$Object$$Object$Array: function (obj, value, indexes){ if (this._Setter == null) throw $CreateException(new System.Exception.ctor$$String("Property " + this._Name + " doesn\'t have a setter"), new Error()); + else + null; if (indexes == null || indexes.length == 0){ this._Setter.call(obj, value); } @@ -7480,8 +8368,12 @@ var System$Type = { _TypeOf: function (jsType){ if (jsType == null) throw $CreateException(new System.Exception.ctor$$String("Cannot resovle type"), new Error()); + else + null; if (jsType._ClrType == null) jsType._ClrType = new System.Type.ctor(jsType); + else + null; return jsType._ClrType; }, GetType$$String: function (name){ @@ -7492,6 +8384,8 @@ var System$Type = { var jsTypeAndArgs = JsTypeHelper._GetTypeWithArguments(name, throwOnError); if (jsTypeAndArgs == null) return null; + else + null; var genericType = System.Type._TypeOf(jsTypeAndArgs[0]); var jsTypeArgs = jsTypeAndArgs[1]; for (var i = 0; i < jsTypeArgs.length; i++){ @@ -7500,17 +8394,25 @@ var System$Type = { var type = genericType._MakeGenericType(jsTypeArgs); return type; } + else + null; var jsType = JsTypeHelper.GetType(name); if (jsType == null){ if (throwOnError) throw $CreateException(new System.Exception.ctor$$String("Type " + name + " was not found"), new Error()); + else + null; return null; } + else + null; return System.Type._TypeOf(jsType); }, GetType$$String$$Boolean$$Boolean: function (name, throwOnError, ignoreCase){ if (ignoreCase) throw $CreateException(new System.NotImplementedException.ctor(), new Error()); + else + null; return System.Type.GetType$$String$$Boolean(name, throwOnError); } }, @@ -7533,6 +8435,8 @@ var System$Type = { this._Name = this._JsType.name; if (System.Type.EmptyTypes == null) System.Type.EmptyTypes = new Array(0); + else + null; }, IsEnum$$: "System.Boolean", get_IsEnum: function (){ @@ -7545,6 +8449,8 @@ var System$Type = { get_BaseType: function (){ if (this._JsType.baseType == null) return null; + else + null; return System.Type._TypeOf(this._JsType.baseType); }, FillProperties: function (def){ @@ -7553,6 +8459,8 @@ var System$Type = { var isSetter = funcName.startsWith("set_"); if (isGetter || isSetter) this.FillProperty(def, funcName, isSetter); + else + null; } }, FillProperty: function (def, funcName, isSetter){ @@ -7573,6 +8481,8 @@ var System$Type = { else { } } + else + null; if (isSetter) prop._Setter = func; else @@ -7581,12 +8491,18 @@ var System$Type = { TryFillProperty: function (def, name){ if (def == null) return false; + else + null; var getterName = "get_" + name; var setterName = "set_" + name; if (def.hasOwnProperty(getterName)) this.FillProperty(def, getterName, false); + else + null; if (def.hasOwnProperty(setterName)) this.FillProperty(def, setterName, true); + else + null; return this._PropertiesByName[name] != null; }, GetProperty$$String: function (name){ @@ -7596,6 +8512,8 @@ var System$Type = { GetProperty$$String$$BindingFlags: function (name, bindingAttr){ if (name == null) throw $CreateException(new System.ArgumentNullException.ctor$$String("name"), new Error()); + else + null; return this.GetProperty$$String(name); }, GetProperty$$String$$Type: function (name, returnType){ @@ -7606,21 +8524,33 @@ var System$Type = { this._PropertiesByName = new Object(); this._Properties = new Array(); } + else + null; if (this._PropertiesByName.hasOwnProperty(name)) - return; + return null; + else + null; if (this.TryFillProperty(this._JsType.definition, name)) - return; + return null; + else + null; if (this.TryFillProperty(this._JsType.staticDefinition, name)) - return; + return null; + else + null; var baseType = this.get_BaseType(); if (baseType != null){ var pe = baseType.GetProperty$$String(name); if (System.Reflection.PropertyInfo.op_Inequality(pe, null)){ this._PropertiesByName[name] = pe; this._Properties.push(pe); - return; + return null; } + else + null; } + else + null; this._PropertiesByName[name] = null; }, VerifyProperties: function (){ @@ -7630,6 +8560,8 @@ var System$Type = { this._PropertiesByName = new Object(); this._Properties = new Array(); } + else + null; this.FillProperties(this._JsType.definition); this.FillProperties(this._JsType.staticDefinition); var baseType = this.get_BaseType(); @@ -7640,9 +8572,15 @@ var System$Type = { this._PropertiesByName[pe._Name] = pe; this._Properties.push(pe); } + else + null; } } + else + null; } + else + null; }, GetProperties: function (){ this.VerifyProperties(); @@ -7653,15 +8591,21 @@ var System$Type = { for (var funcName in def){ if (funcName == "toString") continue; + else + null; var func = def[funcName]; if (SharpKit.JavaScript.Utils.Js.Typeof(func) != "function") continue; + else + null; var methodName = SharpKit.JavaScript.JsNamingHelper.JsFunctionNameToClrMethodName(funcName); var methods = this._MethodsByName[methodName]; if (methods == null){ methods = []; this._MethodsByName[methodName] = methods; } + else + null; var method = new System.Reflection.MethodInfo.ctor(); methods.push(method); this._Methods.push(method); @@ -7677,6 +8621,8 @@ var System$Type = { var methods = this._MethodsByName[name]; if (methods == null) return null; + else + null; return methods[0]; }, VerifyMethods: function (){ @@ -7691,18 +8637,28 @@ var System$Type = { for (var $i18 = 0,$l18 = methods.length,me = methods[$i18]; $i18 < $l18; $i18++, me = methods[$i18]){ if (this._JsType.definition != null && this._JsType.definition.hasOwnProperty(me.JsName)) continue; + else + null; if (this._JsType.staticDefinition != null && this._JsType.staticDefinition.hasOwnProperty(me.JsName)) continue; + else + null; var list = this._MethodsByName[me._Name]; if (list == null){ list = []; this._MethodsByName[me._Name] = list; } + else + null; list.push(me); this._Methods.push(me); } } + else + null; } + else + null; }, GetMethods: function (){ this.VerifyMethods(); @@ -7736,10 +8692,14 @@ var System$Type = { }, VerifyCustomAttributesOnTypeAndMembers: function (){ if (this.verifiedCustomAttributesOnTypeAndMembers) - return; + return null; + else + null; this.verifiedCustomAttributesOnTypeAndMembers = true; if (this._JsType.customAttributes == null) - return; + return null; + else + null; for (var i = 0; i < this._JsType.customAttributes.length; i++){ var attDef = this._JsType.customAttributes[i]; var attType = JsTypeHelper.GetType(attDef.typeName); @@ -7750,12 +8710,18 @@ var System$Type = { var value = attDef.namedArguments[propName]; if (SharpKit.JavaScript.Utils.Js.Typeof(value) == "function") value = value.call(null); + else + null; att["set_" + propName].call(att, value); } } + else + null; var target = this.GetAttributeTarget(attDef.targetType, attDef.targetMemberName); if (target._CustomAttributes == null) target._CustomAttributes = new Array(); + else + null; target._CustomAttributes.push(att); } }, @@ -7768,6 +8734,8 @@ var System$Type = { for (var $i19 = 0,$l19 = methods.length,method = methods[$i19]; $i19 < $l19; $i19++, method = methods[$i19]){ if (method.JsName == memberName) return method; + else + null; } return null; } @@ -7799,11 +8767,15 @@ return this._MakeGenericType(x); GetGenericArguments: function (){ if (this._TypeArguments == null) return System.Type.EmptyTypes; + else + null; return this._TypeArguments; }, _MakeGenericType: function (typeArguments){ if (this._MakeGenericTypeCache == null) this._MakeGenericTypeCache = new Object(); + else + null; var key = ""; for (var i = 0; i < typeArguments.length; i++){ var typeArg = typeArguments[i]; @@ -7823,6 +8795,8 @@ return this._MakeGenericType(x); t._DeclaringType = this._DeclaringType; t._CustomAttributes = this._CustomAttributes; } + else + null; return t; } } @@ -7858,14 +8832,20 @@ var System$Diagnostics$Trace = { }, TraceWarning$$String: function (msg){ if (!System.Diagnostics.Trace.Enabled) - return; + return null; + else + null; if (System.Diagnostics.Trace.Warnings == null) System.Diagnostics.Trace.Warnings = new System.Collections.Generic.List$1.ctor(System.String.ctor); + else + null; System.Diagnostics.Trace.Warnings.Add(msg); }, TraceWarning$$String$$Object$Array: function (format, args){ if (!System.Diagnostics.Trace.Enabled) - return; + return null; + else + null; System.Diagnostics.Trace.TraceWarning$$String(System.String.Format$$String$$Object$Array(format, args)); } }, @@ -8058,64 +9038,106 @@ var System$Math = { Sign$$Decimal: function (value){ if (value < 0.0) return -1; + else + null; if (value > 0.0) return 1; + else + null; if (value == 0.0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Double: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int16: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int32: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Int64: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$SByte: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sign$$Single: function (value){ if (value < 0) return -1; + else + null; if (value > 0) return 1; + else + null; if (value == 0) return 0; + else + null; throw $CreateException(new System.ArgumentException.ctor$$String("value"), new Error()); }, Sin: function (a){ @@ -8208,106 +9230,142 @@ var System$Text$StringBuilder = { this.array.push(s); this.length += s.length; } + else + null; }, Insert$$Int32$$Boolean: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.IndexOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value.toString()); return this; }, Insert$$Int32$$Byte: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Char: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Char$Array: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Decimal: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Double: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int16: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int32: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Int64: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Object: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$SByte: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$Single: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$String: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt16: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt32: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$UInt64: function (index, value){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; this.array.insert(index, value); return this; }, Insert$$Int32$$String$$Int32: function (index, value, count){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; for (var i = 0; i < count; i++) this.array.insert(index, value); return this; @@ -8315,6 +9373,8 @@ var System$Text$StringBuilder = { Insert$$Int32$$Char$Array$$Int32: function (index, value, count){ if (index < 0 || index > this.array.length) throw $CreateException(new System.ArgumentOutOfRangeException.ctor(), new Error()); + else + null; for (var i = 0; i < count; i++) this.array.insert(index, value); return this; @@ -8328,7 +9388,9 @@ var System$Text$StringBuilder = { }, set_Length: function (value){ if (value == this.length) - return; + return null; + else + null; if (value > this.length) this.Append$$String(new Array(value + 1).join("\0")); else { @@ -8407,6 +9469,8 @@ var SharpKit$Extensions2 = { var finalStr = System.String.Concat$$String$$String$$String(s.substr(0, index), replace, s.substr(search.length + index)); return finalStr; } + else + null; return s; }, FixCamelCasing: function (s){ @@ -8418,6 +9482,8 @@ var SharpKit$Extensions2 = { if (System.Char.IsUpper$$Char(c) && !first){ sb.Append$$Char(" "); } + else + null; sb.Append$$Char(c); first = false; } @@ -8429,6 +9495,8 @@ var SharpKit$Extensions2 = { TrimEnd: function (s, trimText){ if (s.EndsWith$$String(trimText)) return SharpKit.Extensions2.RemoveLast(s, trimText.length); + else + null; return s; }, EqualsIgnoreCase: function (s1, s2){ @@ -8556,8 +9624,12 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { Serialize2: function (obj){ if (obj === undefined) return undefined; + else + null; if (obj === null) return null; + else + null; var jsType = typeof(obj); if (jsType == "object"){ return this.SerializeRefOrContent(obj); @@ -8586,6 +9658,8 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { }; info.FirstRef.$k = info.Ref.$r; } + else + null; return info.Ref; } }, @@ -8609,8 +9683,12 @@ var SharpKit$JsClr$Utils$JsClrClientSerializer = { for (var p in obj3){ if (this.IgnoreFields[p]) continue; + else + null; if (!obj3.hasOwnProperty(p)) continue; + else + null; var value = obj3[p]; obj2[p] = this.Serialize2(value); } @@ -8629,6 +9707,8 @@ var SharpKit$JavaScript$JsNamingHelper = { var di = jsFuncName.indexOf("$"); if (di > 0) methodName = jsFuncName.substr(0, di); + else + null; return methodName; }, ClrTypeToJsTypeRef: function (type){ @@ -8636,6 +9716,8 @@ var SharpKit$JavaScript$JsNamingHelper = { if (att != null && SharpKit.Extensions2.IsNotNullOrEmpty$$String(att.get_Name())){ return att.get_Name().Replace$$Char$$Char("`", "$"); } + else + null; return type.get_Namespace() + "." + type.get_Name().Replace$$Char$$Char("`", "$"); }, ClrConstructorToJsFunctionName: function (mi){ @@ -8666,12 +9748,16 @@ var SharpKit$JavaScript$JsNamingHelper = { if (SharpKit.JavaScript.JsNamingHelper.IsPropertySetter(mi)){ return mi.get_Name(); } + else + null; var name = mi.get_Name(); var type = mi.get_DeclaringType(); if (type.get_IsGenericType()){ type = type.GetGenericTypeDefinition(); mi = type.GetMethod$$String(name); } + else + null; var sb = new System.Text.StringBuilder.ctor(); if (mi.get_IsStatic()){ sb.Append$$String(SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(type)); @@ -8683,6 +9769,8 @@ var SharpKit$JavaScript$JsNamingHelper = { sb.Append$$String("."); } } + else + null; sb.Append$$String(name); SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(), sb); return sb.toString(); diff --git a/Frameworks/JsClr/res/jsclr.min.js b/Frameworks/JsClr/res/jsclr.min.js index 28e4d46..a45dfc7 100644 --- a/Frameworks/JsClr/res/jsclr.min.js +++ b/Frameworks/JsClr/res/jsclr.min.js @@ -1,4 +1,4 @@ -/* Generated by SharpKit 5 v5.4.7 */"use strict"; +/* Generated by SharpKit 5 v5.4.8 */"use strict"; if (typeof($CreateException)=='undefined') { var $CreateException = function(ex, error) @@ -123,7 +123,7 @@ function $RemoveDelegate(delOriginal,delToRemove) } }; -var AfterCompilationFunctions= [];var BeforeCompilationFunctions= [];var IsCompiled=false;function RemoveDelegate(delOriginal,delToRemove){if(delToRemove==null||delOriginal==null)return delOriginal;if(delOriginal.isMulticastDelegate){if(delToRemove.isMulticastDelegate)throw $CreateException(new System.NotImplementedException.ctor$$String("Multicast to multicast delegate removal is not implemented yet"),new Error());var del=CreateMulticastDelegateFunction();for(var i=0;i-1){var tokens=name.split(".");name=tokens[tokens.length-1];}type=JsCompiler.Types[name];var nameAfterNs="."+name;if(type==null){for(var p in JsCompiler.Types){if(p==name||p.endsWith(nameAfterNs)){type=JsCompiler.Types[p];break;}}}if(throwIfNotFound&&type==null)throw $CreateException(new Error("type "+name+" was not found with (with IgnoreNamespace)."),new Error());if(cache!=null)cache[name]=(type!=null?type:null);return type;};JsTypeHelper._HasTypeArguments=function(typeName){return typeName.indexOf("[")>-1;};JsTypeHelper._GetTypeWithArguments=function(typeName,throwIfNotFound){var name=typeName;var gti=name.indexOf("`");if(gti!=-1&&name.indexOf("[")>-1){var args=JsTypeHelper._ParseTypeNameArgs(name);if(args==null)return null;var type=JsTypeHelper.GetType(args[0],throwIfNotFound);if(type==null)return null;var res=new Array(0);res.push(type);var typeArgs=new Array(0);for(var i=0;i-1){var tokens=name.split(".");name=tokens[tokens.length-1];}else null;type=JsCompiler.Types[name];var nameAfterNs="."+name;if(type==null){for(var p in JsCompiler.Types){if(p==name||p.endsWith(nameAfterNs)){type=JsCompiler.Types[p];break;}else null;}}else null;if(throwIfNotFound&&type==null)throw $CreateException(new Error("type "+name+" was not found with (with IgnoreNamespace)."),new Error());else null;if(cache!=null)cache[name]=(type!=null?type:null);else null;return type;};JsTypeHelper._HasTypeArguments=function(typeName){return typeName.indexOf("[")>-1;};JsTypeHelper._GetTypeWithArguments=function(typeName,throwIfNotFound){var name=typeName;var gti=name.indexOf("`");if(gti!=-1&&name.indexOf("[")>-1){var args=JsTypeHelper._ParseTypeNameArgs(name);if(args==null)return null;else null;var type=JsTypeHelper.GetType(args[0],throwIfNotFound);if(type==null)return null;else null;var res=new Array(0);res.push(type);var typeArgs=new Array(0);for(var i=0;iyy)return 1;if(xx0;},op_LessThan$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)<0;},op_LessThanOrEqual$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)<=0;},op_GreaterThanOrEqual$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)>=0;},op_Subtraction$$DateTime$$DateTime:function(t1,t2){return System.TimeSpan.FromMilliseconds(t1.valueOf()-t2.valueOf());},op_Subtraction$$DateTime$$TimeSpan:function(t1,t2){return new Date(t1.valueOf()-Cast(t2.get_TotalMilliseconds(),System.Int64.ctor));},op_Addition$$DateTime$$DateTime:function(t1,t2){return System.TimeSpan.FromMilliseconds(t1.valueOf()+t2.valueOf());},op_Addition$$DateTime$$TimeSpan:function(t1,t2){return new Date(t1.valueOf()+Cast(t2.get_TotalMilliseconds(),System.Int64.ctor));},CompareJsDates:function(d1,d2){if(d1==d2)return 0;if(d1==null)return 1;if(d2==null)return -1;return d1.valueOf()-d2.valueOf();},Now$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_Now:function(){return new Date();},UtcNow$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_UtcNow:function(){return System.DateTime.get_Now();},Today$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_Today:function(){return Date.get_Today();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){var x=System.DateTime.MinValue;return x;},ctor$$Int64:function(ticks){throw $CreateException(new System.NotSupportedException.ctor$$String("Ticks are not available due to JavaScript number limitation"),new Error());},ctor$$Int32$$Int32$$Int32:function(year,month,day){var x=new Date();x.set_Year(year);x.set_Month(month);x.set_Day(day);return x;},ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32:function(year,month,day,hour,minute,second){var x=new Date(year,month-1,day,hour,minute,second);return x;},ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32$$DateTimeKind:function(year,month,day,hour,minute,second,kind){var x;if(kind==1){x=new Date(Date.UTC(year,month-1,day,hour,minute,second));}else {x=new Date(year,month-1,day,hour,minute,second);}x._Kind=kind;return x;},Equals$$Object:function(obj){if(obj==null)return false;return obj.valueOf()==this.valueOf();},GetHashCode:function(){return this.valueOf();}}};JsTypes.push(System$DateTime);var System$DateTimeKind={fullname:"System.DateTimeKind",staticDefinition:{Unspecified:0,Utc:1,Local:2},Kind:"Enum"};JsTypes.push(System$DateTimeKind);var System$Delegate={fullname:"System.Delegate",baseTypeName:"System.Object",staticDefinition:{Combine$$Delegate$Array:function(delegates){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Combine$$Delegate$$Delegate:function(delegate1,delegate2){return CombineDelegates(delegate1,delegate2);},Remove:function(delegate1,delegate2){return RemoveDelegate(delegate1,delegate2);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);},DynamicInvoke:function(args){throw $CreateException(new System.NotImplementedException.ctor(),new Error());}}};JsTypes.push(System$Delegate);var System$MulticastDelegate={fullname:"System.MulticastDelegate",baseTypeName:"System.Delegate",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Delegate.ctor.call(this);},GetInvocationList:function(){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Equals$$MulticastDelegate:function(del){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Invoke:function(varargs){throw $CreateException(new System.NotImplementedException.ctor(),new Error());}}};JsTypes.push(System$MulticastDelegate);var System$Action={fullname:"System.Action",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action);var System$Action$1={fullname:"System.Action$1",Kind:"Delegate",definition:{ctor:function(T,obj,func){this.T=T;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$1);var System$Action$2={fullname:"System.Action$2",Kind:"Delegate",definition:{ctor:function(T1,T2,obj,func){this.T1=T1;this.T2=T2;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$2);var System$Action$3={fullname:"System.Action$3",Kind:"Delegate",definition:{ctor:function(T1,T2,T3,obj,func){this.T1=T1;this.T2=T2;this.T3=T3;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$3);var System$Func$1={fullname:"System.Func$1",Kind:"Delegate",definition:{ctor:function(TResult,obj,func){this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$1);var System$Func$2={fullname:"System.Func$2",Kind:"Delegate",definition:{ctor:function(T,TResult,obj,func){this.T=T;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$2);var System$Func$3={fullname:"System.Func$3",Kind:"Delegate",definition:{ctor:function(T1,T2,TResult,obj,func){this.T1=T1;this.T2=T2;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$3);var System$Func$4={fullname:"System.Func$4",Kind:"Delegate",definition:{ctor:function(T1,T2,T3,TResult,obj,func){this.T1=T1;this.T2=T2;this.T3=T3;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$4);var System$EventHandler={fullname:"System.EventHandler",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$EventHandler);var System$EventHandler$1={fullname:"System.EventHandler$1",Kind:"Delegate",definition:{ctor:function(TEventArgs,obj,func){this.TEventArgs=TEventArgs;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$EventHandler$1);var System$Predicate$1={fullname:"System.Predicate$1",Kind:"Delegate",definition:{ctor:function(T,obj,func){this.T=T;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Predicate$1);var System$Enum={fullname:"System.Enum",baseTypeName:"System.Object", -staticDefinition:{GetName:function(enumType,value){if(enumType==null||value==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());var jsType=enumType._JsType;for(var p in jsType.staticDefinition)if(p==value)return p;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},GetNames:function(enumType){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());var jsType=enumType._JsType;var array=new Array();for(var p in jsType.staticDefinition)array.push(p);return array;},GetValues:function(enumType){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());var jsType=enumType._JsType;var array=new Array();for(var p in jsType.staticDefinition)array.push(jsType.staticDefinition[p]);return array;},Parse$$Type$$String:function(enumType,value){return System.Enum.Parse$$Type$$String$$Boolean(enumType,value,false);},Parse$$Type$$String$$Boolean:function(enumType,value,ignoreCase){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());if(value==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("value"),new Error());if(value.trim()==System.String.Empty)throw $CreateException(new System.ArgumentException.ctor$$String("value is either an empty string or only contains white space."),new Error());var jsType=enumType._JsType;for(var p in jsType.staticDefinition)if(ignoreCase?p.toUpperCase()==value.toUpperCase():p==value)return jsType.staticDefinition[p];throw $CreateException(new System.ArgumentException.ctor$$String("value is a name, but not one of the named constants defined for the enumeration."),new Error());}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Enum);var System$Environment={fullname:"System.Environment",baseTypeName:"System.Object",staticDefinition:{GetResourceString:function(p){return p;},TickCount$$:"System.Int32",get_TickCount:function(){return new Date().valueOf();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Environment);var System$EventArgs={fullname:"System.EventArgs",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$EventArgs);var System$Exception={fullname:"System.Exception",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor$$String$$Exception:function(message,innerException){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);this._Message=message;this._InnerException=innerException;},ctor$$String:function(message){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);this._Message=message;},ctor:function(){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);},InnerException$$:"System.Exception",get_InnerException:function(){return this._InnerException;},Message$$:"System.String",get_Message:function(){return this._Message;},toString:function(){var ie=this.get_InnerException();if(ie==null)return this.get_Message();return this.get_Message()+", "+this.get_InnerException();},SetErrorCode:function(hr){}}};JsTypes.push(System$Exception);var System$NotImplementedException={fullname:"System.NotImplementedException",baseTypeName:"System.Exception",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Exception.ctor$$String.call(this,"NotImplementedException");},ctor$$String:function(s){System.Exception.ctor$$String.call(this,"NotImplementedException: "+s);}}};JsTypes.push(System$NotImplementedException);var System$SystemException={fullname:"System.SystemException",baseTypeName:"System.Exception",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Exception.ctor$$String.call(this,System.Environment.GetResourceString("Arg_SystemException"));this.SetErrorCode(-2146233087);},ctor$$String:function(message){System.Exception.ctor$$String.call(this,message);this.SetErrorCode(-2146233087);},ctor$$String$$Exception:function(message,innerException){System.Exception.ctor$$String$$Exception.call(this,message,innerException);this.SetErrorCode(-2146233087);}}};JsTypes.push(System$SystemException);var System$ArgumentException={fullname:"System.ArgumentException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.m_paramName=null;System.SystemException.ctor$$String.call(this,System.Environment.GetResourceString("Arg_ArgumentException"));this.SetErrorCode(-2147024809);},ctor$$String:function(message){this.m_paramName=null;System.SystemException.ctor$$String.call(this,message);this.SetErrorCode(-2147024809);},ctor$$String$$Exception:function(message,innerException){this.m_paramName=null;System.SystemException.ctor$$String$$Exception.call(this,message,innerException);},ctor$$String$$String:function(message,paramName){this.m_paramName=null;System.SystemException.ctor$$String.call(this,message);this.m_paramName=paramName;this.SetErrorCode(-2147024809);},ctor$$String$$String$$Exception:function(message,paramName,innerException){this.m_paramName=null;System.SystemException.ctor$$String$$Exception.call(this,message,innerException);this.m_paramName=paramName;this.SetErrorCode(-2147024809);},ParamName$$:"System.String",get_ParamName:function(){return this.m_paramName;}}};JsTypes.push(System$ArgumentException);var System$NullReferenceException={fullname:"System.NullReferenceException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.SystemException.ctor$$String.call(this,"Object reference not set to an instance of object");},ctor$$String:function(message){System.SystemException.ctor$$String.call(this,message);}}};JsTypes.push(System$NullReferenceException);var System$NotSupportedException={fullname:"System.NotSupportedException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.SystemException.ctor$$String.call(this,"Arg_NotSupportedException");},ctor$$String:function(message){System.SystemException.ctor$$String.call(this,message);},ctor$$String$$Exception:function(message,innerException){System.SystemException.ctor$$String$$Exception.call(this,message,innerException);}}};JsTypes.push(System$NotSupportedException);var System$ArgumentOutOfRangeException={fullname:"System.ArgumentOutOfRangeException",baseTypeName:"System.ArgumentException",staticDefinition:{cctor:function(){System.ArgumentOutOfRangeException._rangeMessage=null;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.m_actualValue=null;System.ArgumentException.ctor$$String.call(this,"Arg_ArgumentOutOfRangeException");this.SetErrorCode(-2146233086) -;},ctor$$String:function(paramName){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,"Arg_ArgumentOutOfRangeException",paramName);this.SetErrorCode(-2146233086);},ctor$$String$$Exception:function(message,innerException){this.m_actualValue=null;System.ArgumentException.ctor$$String$$Exception.call(this,message,innerException);this.SetErrorCode(-2146233086);},ctor$$String$$String:function(paramName,message){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,message,paramName);this.SetErrorCode(-2146233086);},ctor$$String$$Object$$String:function(paramName,actualValue,message){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,message,paramName);this.m_actualValue=actualValue;this.SetErrorCode(-2146233086);},ActualValue$$:"System.Object",get_ActualValue:function(){return this.m_actualValue;},RangeMessage$$:"System.String",get_RangeMessage:function(){if(System.ArgumentOutOfRangeException._rangeMessage==null){System.ArgumentOutOfRangeException._rangeMessage="Arg_ArgumentOutOfRangeException";}return System.ArgumentOutOfRangeException._rangeMessage;}}};JsTypes.push(System$ArgumentOutOfRangeException);var System$Guid={fullname:"System.Guid",baseTypeName:"System.ValueType",staticDefinition:{cctor:function(){System.Guid.Empty=new System.Guid.ctor();System.Guid._random=new System.Random.ctor();System.Guid._hexChars="0123456789abcdef";},NewGuid:function(){var array=new Uint8Array(16);for(var i=0;i<16;i++){array[i]=System.Guid._random.Next$$Int32(256);}var result=new System.Guid.ctor$$Byte$Array(array);result._d=((result._d&63)|128);result._c=((result._c&4095)|16384);return result;},AppendByte:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex((value&15)));},AppendInt:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>28&15));builder.Append$$String(System.Guid.ToHex(value>>24&15));builder.Append$$String(System.Guid.ToHex(value>>20&15));builder.Append$$String(System.Guid.ToHex(value>>16&15));builder.Append$$String(System.Guid.ToHex(value>>12&15));builder.Append$$String(System.Guid.ToHex(value>>8&15));builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex(value&15));},AppendShort:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>12&15));builder.Append$$String(System.Guid.ToHex(value>>8&15));builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex((value&15)));},CheckArray:function(o,l){System.Guid.CheckNull(o);System.Guid.CheckLength(o,l);},CheckLength:function(o,l){if(o.length!=l){throw $CreateException(new System.ArgumentException.ctor$$String(System.String.Format$$String$$Object("Array should be exactly {0} bytes long.",l)),new Error());}},CheckNull:function(o){if(o==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("Value cannot be null."),new Error());}},Compare:function(x,y){return (x>=y)?1:-1;},CreateFormatException:function(s){return new System.FormatException.ctor$$String(System.String.Format$$String$$Object("Invalid Guid format: {0}",s));},ToHex:function(b){return System.Guid._hexChars.substr(b,1);},op_Equality:function(a,b){return a.Equals$$Guid(b);},op_Inequality:function(a,b){return !a.Equals$$Guid(b);}},assemblyName:"SharpKit.JsClr",Kind:"Struct",definition:{ctor$$Byte$Array:function(b){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);this._a=b[0]|(b[1]<<8)|(b[2]<<16)|(b[3]<<24);this._b=(b[4]|(b[5]<<8));this._c=(b[6]|(b[7]<<8));this._d=b[8];this._e=b[9];this._f=b[10];this._g=b[11];this._h=b[12];this._i=b[13];this._j=b[14];this._k=b[15];},ctor$$UInt32$$UInt16$$UInt16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte:function(a,b,c,d,e,f,g,h,i,j,k){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.Guid.ctor$$Int32$$Int16$$Int16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte.call(this,a,b,c,d,e,f,g,h,i,j,k);},ctor$$Int32$$Int16$$Int16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte:function(a,b,c,d,e,f,g,h,i,j,k){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);this._a=a;this._b=b;this._c=c;this._d=d;this._e=e;this._f=f;this._g=g;this._h=h;this._i=i;this._j=j;this._k=k;},BaseToString:function(h,p,b){var stringBuilder=new System.Text.StringBuilder.ctor$$Int32(40);if(p){stringBuilder.Append$$Char("(");}else {if(b){stringBuilder.Append$$Char("{");}}System.Guid.AppendInt(stringBuilder,this._a);if(h){stringBuilder.Append$$Char("-");}System.Guid.AppendShort(stringBuilder,this._b);if(h){stringBuilder.Append$$Char("-");}System.Guid.AppendShort(stringBuilder,this._c);if(h){stringBuilder.Append$$Char("-");}System.Guid.AppendByte(stringBuilder,this._d);System.Guid.AppendByte(stringBuilder,this._e);if(h){stringBuilder.Append$$Char("-");}System.Guid.AppendByte(stringBuilder,this._f);System.Guid.AppendByte(stringBuilder,this._g);System.Guid.AppendByte(stringBuilder,this._h);System.Guid.AppendByte(stringBuilder,this._i);System.Guid.AppendByte(stringBuilder,this._j);System.Guid.AppendByte(stringBuilder,this._k);if(p){stringBuilder.Append$$Char(")");}else {if(b){stringBuilder.Append$$Char("}");}}return stringBuilder.toString();},CompareTo$$Guid:function(value){if(this._a!=value._a){return System.Guid.Compare(this._a,value._a);}if(this._b!=value._b){return System.Guid.Compare(this._b,value._b);}if(this._c!=value._c){return System.Guid.Compare(this._c,value._c);}if(this._d!=value._d){return System.Guid.Compare(this._d,value._d);}if(this._e!=value._e){return System.Guid.Compare(this._e,value._e);}if(this._f!=value._f){return System.Guid.Compare(this._f,value._f);}if(this._g!=value._g){return System.Guid.Compare(this._g,value._g);}if(this._h!=value._h){return System.Guid.Compare(this._h,value._h);}if(this._i!=value._i){return System.Guid.Compare(this._i,value._i);}if(this._j!=value._j){return System.Guid.Compare(this._j,value._j);}if(this._k!=value._k){return System.Guid.Compare(this._k,value._k);}return 0;},CompareTo$$Object:function(value){if(value==null){return 1;}if(!(Is(value,System.Guid.ctor))){throw $CreateException(new System.ArgumentException.ctor$$String$$String("value","Argument of System.Guid.CompareTo should be a Guid."),new Error());}return this.CompareTo$$Guid(Cast(value,System.Guid.ctor));},Equals$$Object:function(o){return Is(o,System.Guid.ctor)&&this.CompareTo$$Guid(Cast(o,System.Guid.ctor))==0;},Equals$$Guid:function(g){return this.CompareTo$$Guid(g)==0;},GetHashCode:function(){var num=this._a;num^=this._b<<16|this._c;num^=this._d<<24;num^=this._e<<16;num^=this._f<<8;num^=this._g;num^=this._h<<24;num^=this._i<<16;num^=this._j<<8;return num^this._k;},toString:function(){return this.BaseToString(true,false,false);},ToString$$String -:function(format){var h=true;var p=false;var b=false;if(format!=null){var a=format.ToLowerInvariant();if(a=="b"){b=true;}else {if(a=="p"){p=true;}else {if(a=="n"){h=false;}else {if(a!="d"&&a!=System.String.Empty){throw $CreateException(new System.FormatException.ctor$$String("Argument to Guid.ToString(string format) should be \"b\", \"B\", \"d\", \"D\", \"n\", \"N\", \"p\" or \"P\""),new Error());}}}}}return this.BaseToString(h,p,b);},ToString$$String$$IFormatProvider:function(format,provider){return this.ToString$$String(format);},ctor:function(){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);}}};JsTypes.push(System$Guid);var System$ICloneable={fullname:"System.ICloneable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$ICloneable);var System$IDisposable={fullname:"System.IDisposable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IDisposable);var System$Int64={fullname:"System.Int64",baseTypeName:"System.Object",staticDefinition:{op_Implicit$$UInt32:function(value){return new System.Int64.ctor$$Object(value);},op_Explicit:function(value){return new System.Int64.ctor$$Object(value);},op_Implicit$$Int64:function(value){return value._value;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._value=null;System.Int64.ctor$$Object.call(this,0);},ctor$$Object:function(value){this._value=null;System.Object.ctor.call(this);this._value=this.Convert(value);},Convert:function(value){if(value==null)throw $CreateException(new System.ArgumentNullException.ctor(),new Error());var regex=new RegExp("^-?([0-9]+)[^0-9]");var match=regex.exec(value.toString());if(match==null)throw $CreateException(new System.FormatException.ctor(),new Error());return new Number(match[1]);}}};JsTypes.push(System$Int64);var System$IComparable={fullname:"System.IComparable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IComparable);var System$IComparable$1={fullname:"System.IComparable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IComparable$1);var System$IEquatable$1={fullname:"System.IEquatable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IEquatable$1);var System$IFormattable={fullname:"System.IFormattable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IFormattable);Date.prototype.CompareTo=function(value){return this.valueOf()-value.valueOf();};Date.prototype.get_Year=function(){if(this._Kind==1)return this.getUTCFullYear();return this.getFullYear();};Date.prototype.set_Year=function(value){if(this._Kind==1)this.setUTCFullYear(value);else this.setFullYear(value);};Date.prototype.get_Month=function(){if(this._Kind==1)return this.getUTCMonth()+1;return this.getMonth()+1;};Date.prototype.set_Month=function(value){if(this._Kind==1)this.setUTCMonth(value-1);else this.setMonth(value-1);};Date.prototype.get_Day=function(){if(this._Kind==1)return this.getUTCDate();return this.getDate();};Date.prototype.set_Day=function(value){if(this._Kind==1)this.setUTCDate(value);else this.setDate(value);};Date.prototype.get_Hour=function(){if(this._Kind==1)return this.getUTCHours();return this.getHours();};Date.prototype.set_Hour=function(value){if(this._Kind==1)this.setUTCHours(value);else this.setHours(value);};Date.prototype.get_Minute=function(){if(this._Kind==1)return this.getUTCMinutes();return this.getMinutes();};Date.prototype.set_Minute=function(value){if(this._Kind==1)this.setUTCMinutes(value);else this.setMinutes(value);};Date.prototype.get_Second=function(){if(this._Kind==1)return this.getUTCSeconds();return this.getSeconds();};Date.prototype.set_Second=function(value){if(this._Kind==1)this.setUTCSeconds(value);else this.setSeconds(value);};Date.prototype.get_Millisecond=function(){if(this._Kind==1)return this.getUTCMilliseconds();return this.getMilliseconds();};Date.prototype.set_Millisecond=function(value){if(this._Kind==1)this.setUTCMilliseconds(value);else this.setMilliseconds(value);};Date.prototype.get_Ticks=function(){if(this._Kind==1)return this.getUTCMilliseconds()*10000;return this.getMilliseconds()*10000;};Date.prototype.set_Ticks=function(value){var milliseconds=value/10000;if(this._Kind==1)this.setUTCMilliseconds(milliseconds);else this.setMilliseconds(milliseconds);};Date.prototype.get_DayOfWeek=function(){return this.getDay();};Date.prototype.ToLocalTime=function(){if(this._Kind!=1)return this;var x=this.Clone();x._Kind=2;return x;};Date.prototype.ToUniversalTime=function(){if(this._Kind==1)return this;var x=this.Clone();x._Kind=1;return x;};Date.get_Today=function(){return new Date().RemoveTime();};Date.prototype.Subtract$$DateTime=function(value){var diff=this.valueOf()-value.valueOf();return new System.TimeSpan.ctor$$Int64(diff*10000);};Date.prototype.Subtract$$TimeSpan=function(value){var newDate=this.Clone();newDate.setMilliseconds(this.getMilliseconds()+value.get_TotalMilliseconds());return newDate;};Date.prototype.ToString$$String=function(format){format=format.Replace$$String$$String("yyyy",this.get_Year().ToString$$String("0000"));format=format.Replace$$String$$String("yy",this.get_Year().ToString$$String("00"));format=format.Replace$$String$$String("y",this.get_Year().toString());format=format.Replace$$String$$String("MM",this.get_Month().ToString$$String("00"));format=format.Replace$$String$$String("M",this.get_Month().toString());format=format.Replace$$String$$String("dd",this.get_Day().ToString$$String("00"));format=format.Replace$$String$$String("d",this.get_Day().toString());format=format.Replace$$String$$String("HH",this.get_Hour().ToString$$String("00"));format=format.Replace$$String$$String("H",this.get_Hour().toString());format=format.Replace$$String$$String("mm",this.get_Minute().ToString$$String("00"));format=format.Replace$$String$$String("m",this.get_Minute().toString());format=format.Replace$$String$$String("ss",this.get_Second().ToString$$String("00"));format=format.Replace$$String$$String("s",this.get_Second().toString());return format;};Date.prototype.Clone=function(){var x=new Date(this.valueOf());x._Kind=this._Kind;return x;};Date.prototype.Clone2=function(totalMs){var x=new Date(totalMs);x._Kind=this._Kind;return x;};Date.prototype.AddMilliseconds=function(miliseconds){var date2=this.Clone2(this.valueOf()+miliseconds);return date2;};Date.prototype.AddSeconds=function(seconds){var ms=this.valueOf()+(seconds*1000);var date2=this.Clone2(ms);return date2;};Date.prototype.AddMinutes=function(minutes){var date2=this.Clone();date2.setMinutes(date2.getMinutes()+minutes);return date2;};Date.prototype.AddHours=function(hours){var date2=this.Clone();date2.setHours(date2.getHours()+hours);return date2;};Date.prototype.AddDays=function(days){var date2=this -.Clone();date2.setDate(date2.getDate()+days);return date2;};Date.prototype.AddMonths=function(months){var date2=this.Clone();date2.setMonth(date2.getMonth()+months);return date2;};Date.prototype.AddYears=function(years){var date2=this.Clone();date2.setMonth(date2.getFullYear()+years);return date2;};Date.prototype.RemoveTime=function(){var date2=this.Clone();date2.setHours(0,0,0,0);return date2;};Date.prototype.Equals$$Object=function(obj){if(obj==null)return false;return obj.valueOf()==this.valueOf();};Date.prototype.GetHashCode=function(){return this.valueOf();};Date.prototype.GetType=function(){return Typeof(System.DateTime.ctor);};Date.prototype.get_Kind=function(){if(this._Kind==null)return 2;return this._Kind;};Number.prototype.CompareTo$$Double=function(value){if(thisvalue)return 1;if(this==value)return 0;if(!System.Double.IsNaN(this))return 1;return !System.Double.IsNaN(value)?-1:0;};Number.prototype.CompareTo$$Int32=function(value){if(thisvalue?1:0;};var System$Nullable$1={fullname:"System.Nullable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T,value){this.T=T;this.hasValue=false;this.value=null;System.Object.ctor.call(this);this.value=value;this.hasValue=true;},HasValue$$:"System.Boolean",get_HasValue:function(){return this.hasValue;},Value$$:"`0",get_Value:function(){if(!this.get_HasValue()){throw $CreateException(new System.InvalidOperationException.ctor$$String("InvalidOperation_NoValue"),new Error());}return this.value;},GetValueOrDefault:function(){return this.value;},GetValueOrDefault$$T:function(defaultValue){if(!this.get_HasValue()){return defaultValue;}return this.value;},Equals$$Object:function(other){if(!this.get_HasValue()){return (other==null);}if(other==null){return false;}return this.value.Equals$$Object(other);},GetHashCode:function(){if(!this.get_HasValue()){return 0;}return this.value.GetHashCode();},toString:function(){if(!this.get_HasValue()){return "";}return this.value.toString();}}};JsTypes.push(System$Nullable$1);var System$Random={fullname:"System.Random",baseTypeName:"System.Object",staticDefinition:{cctor:function(){System.Random.MBIG=2147483647;System.Random.MSEED=161803398;System.Random.MZ=0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.inext=0;this.inextp=0;this.SeedArray=new Int32Array(56);System.Random.ctor$$Int32.call(this,System.Environment.get_TickCount());},ctor$$Int32:function(Seed){this.inext=0;this.inextp=0;this.SeedArray=new Int32Array(56);System.Object.ctor.call(this);var num=161803398-System.Math.Abs$$Int32(Seed);this.SeedArray[55]=num;var num2=1;for(var i=1;i<55;i++){var num3=21*i%55;this.SeedArray[num3]=num2;num2=num-num2;if(num2<0){num2+=2147483647;}num=this.SeedArray[num3];}for(var j=1;j<5;j++){for(var k=1;k<56;k++){this.SeedArray[k]-=this.SeedArray[1+(k+30)%55];if(this.SeedArray[k]<0){this.SeedArray[k]+=2147483647;}}}this.inext=0;this.inextp=21;Seed=1;},Sample:function(){return this.InternalSample()*4.6566128752458E-10;},InternalSample:function(){var num=this.inext;var num2=this.inextp;if(++num>=56){num=1;}if(++num2>=56){num2=1;}var num3=this.SeedArray[num]-this.SeedArray[num2];if(num3<0){num3+=2147483647;}this.SeedArray[num]=num3;this.inext=num;this.inextp=num2;return num3;},Next:function(){return this.InternalSample();},GetSampleForLargeRange:function(){var num=this.InternalSample();var flag=this.InternalSample()%2==0;if(flag){num=-num;}var num2=num;num2+=2147483646;return num2/4294967293;},Next$$Int32$$Int32:function(minValue,maxValue){if(minValue>maxValue){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("minValue","Argument_MinMaxValue"),new Error());}var num=maxValue-minValue;if(num<=2147483647){return (this.Sample()*num)+minValue;}return ((this.GetSampleForLargeRange()*num)+minValue);},Next$$Int32:function(maxValue){if(maxValue<0){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("maxValue","ArgumentOutOfRange_MustBePositive"),new Error());}return (this.Sample()*maxValue);},NextDouble:function(){return this.Sample();},NextBytes:function(buffer){if(buffer==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("buffer"),new Error());}for(var i=0;i=this.str.length){throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Ended"),new Error());}return this.currentElement;}}};JsTypes.push(System$CharEnumerator);var System$StringComparison={fullname:"System.StringComparison",staticDefinition:{CurrentCulture:0,CurrentCultureIgnoreCase:1,InvariantCulture:2,InvariantCultureIgnoreCase:3,Ordinal:4,OrdinalIgnoreCase:5},Kind:"Enum"};JsTypes.push(System$StringComparison);var System$TimeSpan={fullname:"System.TimeSpan",baseTypeName:"System.Object",staticDefinition:{cctor:function(){System.TimeSpan.TicksPerMillisecond=10000;System.TimeSpan.MillisecondsPerTick=0.0001;System.TimeSpan.TicksPerSecond=10000000;System.TimeSpan.SecondsPerTick=1E-07;System.TimeSpan.TicksPerMinute=600000000;System.TimeSpan.MinutesPerTick=1.66666666666667E-09;System.TimeSpan.TicksPerHour=36000000000;System.TimeSpan.HoursPerTick=2.77777777777778E-11;System.TimeSpan.TicksPerDay=864000000000;System.TimeSpan.DaysPerTick=1.15740740740741E-12;System.TimeSpan.MillisPerSecond=1000;System.TimeSpan.MillisPerMinute=60000;System.TimeSpan.MillisPerHour=3600000;System.TimeSpan.MillisPerDay=86400000;System.TimeSpan.MaxSeconds=922337203685;System.TimeSpan.MinSeconds=-922337203685;System.TimeSpan.MaxMilliSeconds=922337203685477;System.TimeSpan -.MinMilliSeconds=-922337203685477;System.TimeSpan.TicksPerTenthSecond=1000000;System.TimeSpan.Zero=new System.TimeSpan.ctor$$Int64(0);System.TimeSpan.MaxValue=new System.TimeSpan.ctor$$Int64(9223372036854775807);System.TimeSpan.MinValue=new System.TimeSpan.ctor$$Int64(-9223372036854775808);},Compare:function(t1,t2){if(t1.get__ticks()>t2.get__ticks()){return 1;}if(t1.get__ticks()=0)?0.5:-0.5);if(num2>922337203685477||num2<-922337203685477){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"),new Error());}return new System.TimeSpan.ctor$$Int64((num2*10000));},FromMilliseconds:function(value){var ts=new System.TimeSpan.ctor();ts._TotalMilliseconds=value;return ts;},FromMinutes:function(value){return System.TimeSpan.Interval(value,60000);},FromSeconds:function(value){return System.TimeSpan.Interval(value,1000);},FromTicks:function(value){return new System.TimeSpan.ctor$$Int64(value);},TimeToTicks:function(hour,minute,second){var num=hour*3600+minute*60+second;if(num>922337203685||num<-922337203685){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}return num*10000000;},TimeToMs:function(hour,minute,second){var num=hour*3600+minute*60+second;if(num>922337203685||num<-922337203685){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}return num*1000;},op_UnaryNegation:function(t){if(t.get__ticks()==System.TimeSpan.MinValue.get__ticks()){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"),new Error());}return new System.TimeSpan.ctor$$Int64(-t.get__ticks());},op_Subtraction:function(t1,t2){return t1.Subtract(t2);},op_UnaryPlus:function(t){return t;},op_Addition:function(t1,t2){return t1.Add(t2);},op_Equality:function(t1,t2){return t1.get__ticks()==t2.get__ticks();},op_Inequality:function(t1,t2){return t1.get__ticks()!=t2.get__ticks();},op_LessThan:function(t1,t2){return t1.get__ticks()t2.get__ticks();},op_GreaterThanOrEqual:function(t1,t2){return t1.get__ticks()>=t2.get__ticks();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._TotalMilliseconds=0;System.Object.ctor.call(this);},Ticks$$:"System.Int64",get_Ticks:function(){return (this._TotalMilliseconds*10000);},_ticks$$:"System.Int64",get__ticks:function(){return (this._TotalMilliseconds*10000);},Days$$:"System.Int32",get_Days:function(){return (this.get__ticks()/864000000000);},Hours$$:"System.Int32",get_Hours:function(){return (this.get__ticks()/36000000000%24);},Milliseconds$$:"System.Int32",get_Milliseconds:function(){return (this.get__ticks()/10000%1000);},Minutes$$:"System.Int32",get_Minutes:function(){return (this.get__ticks()/600000000%60);},Seconds$$:"System.Int32",get_Seconds:function(){return (this.get__ticks()/10000000%60);},TotalDays$$:"System.Double",get_TotalDays:function(){return this._TotalMilliseconds/86400000;},TotalHours$$:"System.Double",get_TotalHours:function(){return this._TotalMilliseconds/3600000;},TotalMilliseconds$$:"System.Double",get_TotalMilliseconds:function(){return this._TotalMilliseconds;},TotalMinutes$$:"System.Double",get_TotalMinutes:function(){return this._TotalMilliseconds/60000;},TotalSeconds$$:"System.Double",get_TotalSeconds:function(){return this._TotalMilliseconds/1000;},ctor$$Int64:function(ticks){this._TotalMilliseconds=0;System.Object.ctor.call(this);this._TotalMilliseconds=ticks/10000;},ctor$$Int32$$Int32$$Int32:function(hours,minutes,seconds){this._TotalMilliseconds=0;System.Object.ctor.call(this);this._TotalMilliseconds=System.TimeSpan.TimeToMs(hours,minutes,seconds);},ctor$$Int32$$Int32$$Int32$$Int32:function(days,hours,minutes,seconds){this._TotalMilliseconds=0;System.TimeSpan.ctor$$Int32$$Int32$$Int32$$Int32$$Int32.call(this,days,hours,minutes,seconds,0);},ctor$$Int32$$Int32$$Int32$$Int32$$Int32:function(days,hours,minutes,seconds,milliseconds){this._TotalMilliseconds=0;System.Object.ctor.call(this);var num=(days*3600*24+hours*3600+minutes*60+seconds)*1000+milliseconds;if(num>922337203685477||num<-922337203685477){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}this._TotalMilliseconds=num;},Add:function(ts){var num=this._TotalMilliseconds+ts._TotalMilliseconds;return System.TimeSpan.FromMilliseconds(num);},CompareTo$$Object:function(value){if(value==null){return 1;}if(!(Is(value,System.TimeSpan.ctor))){throw $CreateException(new System.ArgumentException.ctor$$String("Arg_MustBeTimeSpan"),new Error());}var ticks=(Cast(value,System.TimeSpan.ctor)).get__ticks();if(this.get__ticks()>ticks){return 1;}if(this.get__ticks()ticks){return 1;}if(this.get__ticks()=0)?this.get__ticks():(-this.get__ticks()));},Equals$$Object:function(value){return Is(value,System.TimeSpan.ctor)&&this.get__ticks()==(Cast(value,System.TimeSpan.ctor)).get__ticks();},Equals$$TimeSpan:function(obj){return this.get__ticks()==obj.get__ticks();},GetHashCode:function(){return (this.get__ticks()^(this.get__ticks()>>32));},Negate:function(){if(this.get_Ticks()==System.TimeSpan.MinValue.get_Ticks()){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"),new Error());}return new System.TimeSpan.ctor$$Int64(-this.get__ticks());},Subtract:function(ts){var num=this.get__ticks()-ts.get__ticks();if(this.get__ticks()>>63!=ts.get__ticks()>>63&&this.get__ticks()>>63!=num>>63){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"),new Error());}return new System.TimeSpan.ctor$$Int64(num);}}};JsTypes.push(System$TimeSpan);var System$Tuple={fullname:"System.Tuple",baseTypeName:"System.Object",staticDefinition:{Create$1$$T1:function(T1,item1){return new System.Tuple$1.ctor(T1,item1);},Create$2$$T1$$T2:function(T1,T2,item1,item2){return new System.Tuple$2.ctor(T1,T2,item1,item2);},Create$3$$T1$$T2$$T3:function(T1,T2 -,T3,item1,item2,item3){return new System.Tuple$3.ctor(T1,T2,T3,item1,item2,item3);},Create$4$$T1$$T2$$T3$$T4:function(T1,T2,T3,T4,item1,item2,item3,item4){return new System.Tuple$4.ctor(T1,T2,T3,T4,item1,item2,item3,item4);},Create$5$$T1$$T2$$T3$$T4$$T5:function(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5){return new System.Tuple$5.ctor(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5);},Create$6$$T1$$T2$$T3$$T4$$T5$$T6:function(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6){return new System.Tuple$6.ctor(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6);},Create$7$$T1$$T2$$T3$$T4$$T5$$T6$$T7:function(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7){return new System.Tuple$7.ctor(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7);},Create$8$$T1$$T2$$T3$$T4$$T5$$T6$$T7$$T8:function(T1,T2,T3,T4,T5,T6,T7,T8,item1,item2,item3,item4,item5,item6,item7,item8){return new System.Tuple$8.ctor(T1,T2,T3,T4,T5,T6,T7,System.Tuple$1.ctor,item1,item2,item3,item4,item5,item6,item7,new System.Tuple$1.ctor(T8,item8));}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Tuple);var System$Tuple$1={fullname:"System.Tuple$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,item1){this.T1=T1;this._item1=null;System.Object.ctor.call(this);this._item1=item1;},Item1$$:"`0",get_Item1:function(){return this._item1;}}};JsTypes.push(System$Tuple$1);var System$Tuple$2={fullname:"System.Tuple$2",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,item1,item2){this.T1=T1;this.T2=T2;this._item1=null;this._item2=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;}}};JsTypes.push(System$Tuple$2);var System$Tuple$3={fullname:"System.Tuple$3",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,item1,item2,item3){this.T1=T1;this.T2=T2;this.T3=T3;this._item1=null;this._item2=null;this._item3=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;}}};JsTypes.push(System$Tuple$3);var System$Tuple$4={fullname:"System.Tuple$4",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,item1,item2,item3,item4){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this._item1=null;this._item2=null;this._item3=null;this._item4=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;}}};JsTypes.push(System$Tuple$4);var System$Tuple$5={fullname:"System.Tuple$5",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;}}};JsTypes.push(System$Tuple$5);var System$Tuple$6={fullname:"System.Tuple$6",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this.T6=T6;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;this._item6=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;this._item6=item6;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;},Item6$$:"`5",get_Item6:function(){return this._item6;}}};JsTypes.push(System$Tuple$6);var System$Tuple$7={fullname:"System.Tuple$7",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this.T6=T6;this.T7=T7;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;this._item6=null;this._item7=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;this._item6=item6;this._item7=item7;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;},Item6$$:"`5",get_Item6:function(){return this._item6;},Item7$$:"`6",get_Item7:function(){return this._item7;}}};JsTypes.push(System$Tuple$7);var System$UInt32={fullname:"System.UInt32",baseTypeName:"System.Object",staticDefinition:{op_Implicit$$UInt32:function(value){return value._value;},op_Explicit:function(value){return new System.UInt32.ctor$$Object(value);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._value=null;System.UInt32.ctor$$Object.call(this,0);},ctor$$Object:function(value){this._value=null;System.Object.ctor.call(this);this._value=this.Convert(value);},Convert:function(value){if(value==null)throw $CreateException(new System.ArgumentNullException.ctor(),new Error());var regex=new RegExp("^-?([0-9]+)[^0-9]");var match=regex.exec(value.toString());if(match==null)throw $CreateException(new System.FormatException.ctor(),new Error());return new Number(match[1]);}}};JsTypes.push(System$UInt32);var System$Uri={fullname:"System.Uri",baseTypeName:"System.Object",staticDefinition:{op_Equality:function(u1,u2){if(u1==u2){return true;}if(u1==null){return false;}if(u2==null){return false;}return u1._OriginalString==u2._OriginalString;},op_Inequality:function(u1,u2){return !(System.Uri.op_Equality(u1,u2));}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._OriginalString=null;this._Fragment=null;this._Query=null;System.Object.ctor.call(this -);this._OriginalString=null;},ctor$$String:function(uri){this._OriginalString=null;this._Fragment=null;this._Query=null;System.Object.ctor.call(this);this._OriginalString=uri;},OriginalString$$:"System.String",get_OriginalString:function(){return this._OriginalString;},AbsoluteUri$$:"System.String",get_AbsoluteUri:function(){return this._OriginalString;},toString:function(){return this._OriginalString;},Equals$$Object:function(obj){return System.Uri.op_Equality(this,Cast(obj,System.Uri.ctor));},GetHashCode:function(){return System.Object.commonPrototype.GetHashCode.call(this);},Fragment$$:"System.String",get_Fragment:function(){if(this._Fragment==null){var idx=this._OriginalString.indexOf("#");if(idx==-1)this._Fragment="";else this._Fragment=this._OriginalString.substr(idx);}return this._Fragment;},Query$$:"System.String",get_Query:function(){if(this._Query==null){var idx=this._OriginalString.indexOf("?");if(idx==-1)this._Query="";else {var idx2=this._OriginalString.indexOf("#");if(idx2==-1)this._Query=this._OriginalString.substr(idx);else this._Query=this._OriginalString.substr(idx,idx2-idx);}}return this._Query;}}};JsTypes.push(System$Uri);var System$ValueType={fullname:"System.ValueType",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$ValueType);var SharpKit$Html4$HtmlDomEventHandler={fullname:"SharpKit.Html4.HtmlDomEventHandler",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(SharpKit$Html4$HtmlDomEventHandler);var JsRuntime=function(){};JsRuntime.Start=function(){Compile();}; + };JsTypeHelper.GetType=function(typeOrNameOrCtor,throwIfNotFound){if(typeof(typeOrNameOrCtor)!="string"){if(typeof(typeOrNameOrCtor)=="function")return typeOrNameOrCtor._type;else null;return typeOrNameOrCtor;}else null;var name=typeOrNameOrCtor;var gti=name.indexOf("`");if(gti!=-1){name=name.substr(0,gti+2).replace("`","$");}else null;var type=JsCompiler.Types[name];if(type==null){if(throwIfNotFound)throw $CreateException(new Error("JsType "+name+" was not found"),new Error());else null;return null;}else null;return type;};JsTypeHelper.FindType=function(name,throwIfNotFound){var type=JsTypeHelper.GetType(name,false);if(type==null)type=JsTypeHelper.GetTypeIgnoreNamespace(name,throwIfNotFound);else null;return type;};JsTypeHelper.GetAssemblyQualifiedName=function(type){if(type._AssemblyQualifiedName==null){var name=type.fullname;if(type.assemblyName!=null)name+=", "+type.assemblyName;else null;type._AssemblyQualifiedName=name;}else null;return type._AssemblyQualifiedName;};JsTypeHelper.GetName=function(type){return type.name;};JsTypeHelper.getMemberTypeName=function(instance,memberName){var signature=instance[memberName+"$$"];if(signature==null)return null;else null;var tokens=signature.split(" ");var memberTypeName=tokens[tokens.length-1];return memberTypeName;};JsTypeHelper.GetDelegate=function(obj,func){var target=obj;if(target==null)return func;else null;if(typeof(func)=="string")func=target[func];else null;var cache=target.__delegateCache;if(cache==null){cache=new Object();target.__delegateCache=cache;}else null;var key=JsCompiler.GetHashKey(func);var del=cache[key];if(del==null){del=function(){var del2=arguments.callee;return del2.func.apply(del.target,arguments);};del.func=func;del.target=target;del.isDelegate=true;cache[key]=del;}else null;return del;}; +if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Activator={fullname:"System.Activator",baseTypeName:"System.Object",staticDefinition:{CreateInstance$$Type:function(type){return new type._JsType.ctor();},CreateInstance$$Type$$BindingFlags$$Binder$$Object$Array$$CultureInfo:function(type,bindingAttr,binder,args,culture){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},CreateInstance$$Type$$BindingFlags$$Binder$$Object$Array$$CultureInfo$$Object$Array:function(type,bindingAttr,binder,args,culture,activationAttributes){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},CreateInstance$$Type$$Object$Array:function(type,args){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},CreateInstance$$Type$$Object$Array$$Object$Array:function(type,args,activationAttributes){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},CreateInstance$$Type$$Boolean:function(type,nonPublic){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},CreateInstance$1:function(T){return System.Activator.CreateInstance$$Type(Typeof(T));}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Activator);var System$Array={fullname:"System.Array",baseTypeName:"System.Object",staticDefinition:{Sort$$Array:function(array){System.Array.Sort$1$$T$Array(System.Object.ctor,array);},Sort$1$$T$Array:function(T,array){System.Array.Sort$1$$T$Array$$Comparison$1(T,array,null);},Sort$1$$T$Array$$Comparison$1:function(T,array,cmpFunc){var needConvert=!(array instanceof Array);var sortArray=null;if(needConvert){sortArray=new Array(array.length);for(var i=0;iyy)return 1;else null;if(xx0;},op_LessThan$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)<0;},op_LessThanOrEqual$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)<=0;},op_GreaterThanOrEqual$$DateTime$$DateTime:function(t1,t2){return System.DateTime.Compare(t1,t2)>=0;},op_Subtraction$$DateTime$$DateTime:function(t1,t2){return System.TimeSpan.FromMilliseconds(t1.valueOf()-t2.valueOf());},op_Subtraction$$DateTime$$TimeSpan:function(t1,t2){return new Date(t1.valueOf()-Cast(t2.get_TotalMilliseconds(),System.Int64.ctor));},op_Addition$$DateTime$$DateTime:function(t1,t2){return System.TimeSpan.FromMilliseconds(t1.valueOf()+t2.valueOf());},op_Addition$$DateTime$$TimeSpan:function(t1,t2){return new Date(t1.valueOf()+Cast(t2.get_TotalMilliseconds(),System.Int64.ctor));},CompareJsDates:function(d1,d2){if(d1==d2)return 0;else null;if(d1==null)return 1;else null;if(d2==null)return -1;else null;return d1.valueOf()-d2.valueOf();},Now$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_Now:function(){return new Date();},UtcNow$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_UtcNow:function(){return System.DateTime.get_Now();},Today$$:"SharpKit.JavaScript.Private.JsImplDateTime",get_Today:function(){return Date.get_Today();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){var x=System.DateTime.MinValue;return x;},ctor$$Int64:function(ticks){throw $CreateException(new System.NotSupportedException.ctor$$String("Ticks are not available due to JavaScript number limitation"),new Error());},ctor$$Int32$$Int32$$Int32:function(year,month,day){var x=new Date();x.set_Year(year);x.set_Month(month);x.set_Day(day);return x;},ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32:function(year,month,day,hour,minute,second){var x=new Date(year,month-1,day,hour,minute,second);return x;},ctor$$Int32$$Int32$$Int32$$Int32$$Int32$$Int32$$DateTimeKind:function(year,month,day,hour,minute,second,kind){var x=null;if(kind==1){x=new Date(Date.UTC(year,month-1,day,hour,minute,second));}else {x=new Date(year,month-1,day,hour,minute,second);}x._Kind=kind;return x;},Equals$$Object:function(obj){if(obj==null)return false;else null;return obj.valueOf()==this.valueOf();},GetHashCode:function(){return this.valueOf();}}};JsTypes.push(System$DateTime);var System$DateTimeKind={fullname:"System.DateTimeKind",staticDefinition:{Unspecified:0,Utc:1,Local:2},Kind:"Enum"};JsTypes.push(System$DateTimeKind);var System$Delegate={fullname:"System.Delegate",baseTypeName:"System.Object",staticDefinition:{Combine$$Delegate$Array:function(delegates){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Combine$$Delegate$$Delegate:function(delegate1,delegate2){return CombineDelegates(delegate1,delegate2);},Remove:function(delegate1,delegate2){return RemoveDelegate(delegate1,delegate2);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);},DynamicInvoke:function(args){throw $CreateException(new System.NotImplementedException.ctor(),new Error());}}};JsTypes.push(System$Delegate);var System$MulticastDelegate={fullname:"System.MulticastDelegate",baseTypeName:"System.Delegate",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Delegate.ctor.call(this);},GetInvocationList:function(){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Equals$$MulticastDelegate:function(del){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Invoke:function(varargs){throw $CreateException(new System.NotImplementedException.ctor(),new Error());}}};JsTypes.push(System$MulticastDelegate);var System$Action={fullname:"System.Action",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action);var System$Action$1={fullname:"System.Action$1",Kind:"Delegate",definition:{ctor:function(T,obj,func){this.T=T;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$1);var System$Action$2={fullname:"System.Action$2",Kind:"Delegate",definition:{ctor:function(T1,T2,obj,func){this.T1=T1;this.T2=T2;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$2);var System$Action$3={fullname:"System.Action$3",Kind:"Delegate",definition:{ctor:function(T1,T2,T3,obj,func){this.T1=T1;this.T2=T2;this.T3=T3;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Action$3);var System$Func$1={fullname:"System.Func$1",Kind:"Delegate",definition:{ctor:function(TResult,obj,func){this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$1);var System$Func$2={fullname:"System.Func$2",Kind:"Delegate",definition:{ctor:function(T,TResult,obj,func){this.T=T;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$2);var System$Func$3={fullname:"System.Func$3",Kind:"Delegate",definition:{ctor:function(T1,T2,TResult,obj,func){this.T1=T1;this.T2=T2;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$3);var System$Func$4={fullname:"System.Func$4",Kind:"Delegate",definition:{ctor:function(T1,T2,T3,TResult,obj,func){this.T1=T1;this.T2=T2;this.T3=T3;this.TResult=TResult;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Func$4);var System$EventHandler={fullname:"System.EventHandler",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$EventHandler);var System$EventHandler$1={fullname:"System.EventHandler$1",Kind:"Delegate",definition:{ctor:function(TEventArgs,obj,func){this.TEventArgs=TEventArgs;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$EventHandler$1);var System$Predicate$1 +={fullname:"System.Predicate$1",Kind:"Delegate",definition:{ctor:function(T,obj,func){this.T=T;System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(System$Predicate$1);var System$Enum={fullname:"System.Enum",baseTypeName:"System.Object",staticDefinition:{GetName:function(enumType,value){if(enumType==null||value==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());else null;var jsType=enumType._JsType;for(var p in jsType.staticDefinition)if(p==value)return p;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},GetNames:function(enumType){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());else null;var jsType=enumType._JsType;var array=new Array();for(var p in jsType.staticDefinition)array.push(p);return array;},GetValues:function(enumType){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());else null;var jsType=enumType._JsType;var array=new Array();for(var p in jsType.staticDefinition)array.push(jsType.staticDefinition[p]);return array;},Parse$$Type$$String:function(enumType,value){return System.Enum.Parse$$Type$$String$$Boolean(enumType,value,false);},Parse$$Type$$String$$Boolean:function(enumType,value,ignoreCase){if(enumType==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("enumType"),new Error());else null;if(value==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("value"),new Error());else null;if(value.trim()==System.String.Empty)throw $CreateException(new System.ArgumentException.ctor$$String("value is either an empty string or only contains white space."),new Error());else null;var jsType=enumType._JsType;for(var p in jsType.staticDefinition)if(ignoreCase?p.toUpperCase()==value.toUpperCase():p==value)return jsType.staticDefinition[p];else null;throw $CreateException(new System.ArgumentException.ctor$$String("value is a name, but not one of the named constants defined for the enumeration."),new Error());}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Enum);var System$Environment={fullname:"System.Environment",baseTypeName:"System.Object",staticDefinition:{GetResourceString:function(p){return p;},TickCount$$:"System.Int32",get_TickCount:function(){return new Date().valueOf();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Environment);var System$EventArgs={fullname:"System.EventArgs",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$EventArgs);var System$Exception={fullname:"System.Exception",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor$$String$$Exception:function(message,innerException){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);this._Message=message;this._InnerException=innerException;},ctor$$String:function(message){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);this._Message=message;},ctor:function(){this._InnerException=null;this._Message=null;System.Object.ctor.call(this);},InnerException$$:"System.Exception",get_InnerException:function(){return this._InnerException;},Message$$:"System.String",get_Message:function(){return this._Message;},toString:function(){var ie=this.get_InnerException();if(ie==null)return this.get_Message();else null;return this.get_Message()+", "+this.get_InnerException();},SetErrorCode:function(hr){}}};JsTypes.push(System$Exception);var System$NotImplementedException={fullname:"System.NotImplementedException",baseTypeName:"System.Exception",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Exception.ctor$$String.call(this,"NotImplementedException");},ctor$$String:function(s){System.Exception.ctor$$String.call(this,"NotImplementedException: "+s);}}};JsTypes.push(System$NotImplementedException);var System$SystemException={fullname:"System.SystemException",baseTypeName:"System.Exception",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Exception.ctor$$String.call(this,System.Environment.GetResourceString("Arg_SystemException"));this.SetErrorCode(-2146233087);},ctor$$String:function(message){System.Exception.ctor$$String.call(this,message);this.SetErrorCode(-2146233087);},ctor$$String$$Exception:function(message,innerException){System.Exception.ctor$$String$$Exception.call(this,message,innerException);this.SetErrorCode(-2146233087);}}};JsTypes.push(System$SystemException);var System$ArgumentException={fullname:"System.ArgumentException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.m_paramName=null;System.SystemException.ctor$$String.call(this,System.Environment.GetResourceString("Arg_ArgumentException"));this.SetErrorCode(-2147024809);},ctor$$String:function(message){this.m_paramName=null;System.SystemException.ctor$$String.call(this,message);this.SetErrorCode(-2147024809);},ctor$$String$$Exception:function(message,innerException){this.m_paramName=null;System.SystemException.ctor$$String$$Exception.call(this,message,innerException);},ctor$$String$$String:function(message,paramName){this.m_paramName=null;System.SystemException.ctor$$String.call(this,message);this.m_paramName=paramName;this.SetErrorCode(-2147024809);},ctor$$String$$String$$Exception:function(message,paramName,innerException){this.m_paramName=null;System.SystemException.ctor$$String$$Exception.call(this,message,innerException);this.m_paramName=paramName;this.SetErrorCode(-2147024809);},ParamName$$:"System.String",get_ParamName:function(){return this.m_paramName;}}};JsTypes.push(System$ArgumentException);var System$NullReferenceException={fullname:"System.NullReferenceException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.SystemException.ctor$$String.call(this,"Object reference not set to an instance of object");},ctor$$String:function(message){System.SystemException.ctor$$String.call(this,message);}}};JsTypes.push(System$NullReferenceException);var System$NotSupportedException={fullname:"System.NotSupportedException",baseTypeName:"System.SystemException",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.SystemException.ctor$$String.call(this,"Arg_NotSupportedException");},ctor$$String:function(message){System.SystemException.ctor$$String.call(this,message);},ctor$$String$$Exception:function(message,innerException){System.SystemException.ctor$$String$$Exception.call(this,message,innerException);}}};JsTypes.push(System$NotSupportedException);var System$ArgumentOutOfRangeException={fullname:"System.ArgumentOutOfRangeException", +baseTypeName:"System.ArgumentException",staticDefinition:{cctor:function(){System.ArgumentOutOfRangeException._rangeMessage=null;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.m_actualValue=null;System.ArgumentException.ctor$$String.call(this,"Arg_ArgumentOutOfRangeException");this.SetErrorCode(-2146233086);},ctor$$String:function(paramName){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,"Arg_ArgumentOutOfRangeException",paramName);this.SetErrorCode(-2146233086);},ctor$$String$$Exception:function(message,innerException){this.m_actualValue=null;System.ArgumentException.ctor$$String$$Exception.call(this,message,innerException);this.SetErrorCode(-2146233086);},ctor$$String$$String:function(paramName,message){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,message,paramName);this.SetErrorCode(-2146233086);},ctor$$String$$Object$$String:function(paramName,actualValue,message){this.m_actualValue=null;System.ArgumentException.ctor$$String$$String.call(this,message,paramName);this.m_actualValue=actualValue;this.SetErrorCode(-2146233086);},ActualValue$$:"System.Object",get_ActualValue:function(){return this.m_actualValue;},RangeMessage$$:"System.String",get_RangeMessage:function(){if(System.ArgumentOutOfRangeException._rangeMessage==null){System.ArgumentOutOfRangeException._rangeMessage="Arg_ArgumentOutOfRangeException";}else null;return System.ArgumentOutOfRangeException._rangeMessage;}}};JsTypes.push(System$ArgumentOutOfRangeException);var System$Guid={fullname:"System.Guid",baseTypeName:"System.ValueType",staticDefinition:{cctor:function(){System.Guid.Empty=new System.Guid.ctor();System.Guid._random=new System.Random.ctor();System.Guid._hexChars="0123456789abcdef";},NewGuid:function(){var array=new Uint8Array(16);for(var i=0;i<16;i++){array[i]=System.Guid._random.Next$$Int32(256);}var result=new System.Guid.ctor$$Byte$Array(array);result._d=((result._d&63)|128);result._c=((result._c&4095)|16384);return result;},AppendByte:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex((value&15)));},AppendInt:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>28&15));builder.Append$$String(System.Guid.ToHex(value>>24&15));builder.Append$$String(System.Guid.ToHex(value>>20&15));builder.Append$$String(System.Guid.ToHex(value>>16&15));builder.Append$$String(System.Guid.ToHex(value>>12&15));builder.Append$$String(System.Guid.ToHex(value>>8&15));builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex(value&15));},AppendShort:function(builder,value){builder.Append$$String(System.Guid.ToHex(value>>12&15));builder.Append$$String(System.Guid.ToHex(value>>8&15));builder.Append$$String(System.Guid.ToHex(value>>4&15));builder.Append$$String(System.Guid.ToHex((value&15)));},CheckArray:function(o,l){System.Guid.CheckNull(o);System.Guid.CheckLength(o,l);},CheckLength:function(o,l){if(o.length!=l){throw $CreateException(new System.ArgumentException.ctor$$String(System.String.Format$$String$$Object("Array should be exactly {0} bytes long.",l)),new Error());}else null;},CheckNull:function(o){if(o==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("Value cannot be null."),new Error());}else null;},Compare:function(x,y){return (x>=y)?1:-1;},CreateFormatException:function(s){return new System.FormatException.ctor$$String(System.String.Format$$String$$Object("Invalid Guid format: {0}",s));},ToHex:function(b){return System.Guid._hexChars.substr(b,1);},op_Equality:function(a,b){return a.Equals$$Guid(b);},op_Inequality:function(a,b){return !a.Equals$$Guid(b);}},assemblyName:"SharpKit.JsClr",Kind:"Struct",definition:{ctor$$Byte$Array:function(b){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);this._a=b[0]|(b[1]<<8)|(b[2]<<16)|(b[3]<<24);this._b=(b[4]|(b[5]<<8));this._c=(b[6]|(b[7]<<8));this._d=b[8];this._e=b[9];this._f=b[10];this._g=b[11];this._h=b[12];this._i=b[13];this._j=b[14];this._k=b[15];},ctor$$UInt32$$UInt16$$UInt16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte:function(a,b,c,d,e,f,g,h,i,j,k){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.Guid.ctor$$Int32$$Int16$$Int16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte.call(this,a,b,c,d,e,f,g,h,i,j,k);},ctor$$Int32$$Int16$$Int16$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte$$Byte:function(a,b,c,d,e,f,g,h,i,j,k){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);this._a=a;this._b=b;this._c=c;this._d=d;this._e=e;this._f=f;this._g=g;this._h=h;this._i=i;this._j=j;this._k=k;},BaseToString:function(h,p,b){var stringBuilder=new System.Text.StringBuilder.ctor$$Int32(40);if(p){stringBuilder.Append$$Char("(");}else {if(b){stringBuilder.Append$$Char("{");}else null;}System.Guid.AppendInt(stringBuilder,this._a);if(h){stringBuilder.Append$$Char("-");}else null;System.Guid.AppendShort(stringBuilder,this._b);if(h){stringBuilder.Append$$Char("-");}else null;System.Guid.AppendShort(stringBuilder,this._c);if(h){stringBuilder.Append$$Char("-");}else null;System.Guid.AppendByte(stringBuilder,this._d);System.Guid.AppendByte(stringBuilder,this._e);if(h){stringBuilder.Append$$Char("-");}else null;System.Guid.AppendByte(stringBuilder,this._f);System.Guid.AppendByte(stringBuilder,this._g);System.Guid.AppendByte(stringBuilder,this._h);System.Guid.AppendByte(stringBuilder,this._i);System.Guid.AppendByte(stringBuilder,this._j);System.Guid.AppendByte(stringBuilder,this._k);if(p){stringBuilder.Append$$Char(")");}else {if(b){stringBuilder.Append$$Char("}");}else null;}return stringBuilder.toString();},CompareTo$$Guid:function(value){if(this._a!=value._a){return System.Guid.Compare(this._a,value._a);}else null;if(this._b!=value._b){return System.Guid.Compare(this._b,value._b);}else null;if(this._c!=value._c){return System.Guid.Compare(this._c,value._c);}else null;if(this._d!=value._d){return System.Guid.Compare(this._d,value._d);}else null;if(this._e!=value._e){return System.Guid.Compare(this._e,value._e);}else null;if(this._f!=value._f){return System.Guid.Compare(this._f,value._f);}else null;if(this._g!=value._g){return System.Guid.Compare(this._g,value._g);}else null;if(this._h!=value._h){return System.Guid.Compare(this._h,value._h);}else null;if(this._i!=value._i){return System.Guid.Compare(this._i,value._i);}else null;if(this._j!=value._j){return System.Guid.Compare(this._j,value._j);}else null;if(this._k!=value._k){return System.Guid.Compare(this._k,value._k);}else null;return 0;},CompareTo$$Object:function(value){if(value==null){return 1;}else null;if(!(Is(value,System.Guid.ctor))){throw $CreateException(new System.ArgumentException.ctor$$String$$String("value","Argument of System.Guid.CompareTo should be a Guid.") +,new Error());}else null;return this.CompareTo$$Guid(Cast(value,System.Guid.ctor));},Equals$$Object:function(o){return Is(o,System.Guid.ctor)&&this.CompareTo$$Guid(Cast(o,System.Guid.ctor))==0;},Equals$$Guid:function(g){return this.CompareTo$$Guid(g)==0;},GetHashCode:function(){var num=this._a;num^=this._b<<16|this._c;num^=this._d<<24;num^=this._e<<16;num^=this._f<<8;num^=this._g;num^=this._h<<24;num^=this._i<<16;num^=this._j<<8;return num^this._k;},toString:function(){return this.BaseToString(true,false,false);},ToString$$String:function(format){var h=true;var p=false;var b=false;if(format!=null){var a=format.ToLowerInvariant();if(a=="b"){b=true;}else {if(a=="p"){p=true;}else {if(a=="n"){h=false;}else {if(a!="d"&&a!=System.String.Empty){throw $CreateException(new System.FormatException.ctor$$String("Argument to Guid.ToString(string format) should be \"b\", \"B\", \"d\", \"D\", \"n\", \"N\", \"p\" or \"P\""),new Error());}else null;}}}}else null;return this.BaseToString(h,p,b);},ToString$$String$$IFormatProvider:function(format,provider){return this.ToString$$String(format);},ctor:function(){this._i=0;this._h=0;this._k=0;this._j=0;this._g=0;this._c=0;this._b=0;this._a=0;this._f=0;this._e=0;this._d=0;System.ValueType.ctor.call(this);}}};JsTypes.push(System$Guid);var System$ICloneable={fullname:"System.ICloneable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$ICloneable);var System$IDisposable={fullname:"System.IDisposable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IDisposable);var System$Int64={fullname:"System.Int64",baseTypeName:"System.Object",staticDefinition:{op_Implicit$$UInt32:function(value){return new System.Int64.ctor$$Object(value);},op_Explicit:function(value){return new System.Int64.ctor$$Object(value);},op_Implicit$$Int64:function(value){return value._value;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._value=null;System.Int64.ctor$$Object.call(this,0);},ctor$$Object:function(value){this._value=null;System.Object.ctor.call(this);this._value=this.Convert(value);},Convert:function(value){if(value==null)throw $CreateException(new System.ArgumentNullException.ctor(),new Error());else null;var regex=new RegExp("^-?([0-9]+)[^0-9]");var match=regex.exec(value.toString());if(match==null)throw $CreateException(new System.FormatException.ctor(),new Error());else null;return new Number(match[1]);}}};JsTypes.push(System$Int64);var System$IComparable={fullname:"System.IComparable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IComparable);var System$IComparable$1={fullname:"System.IComparable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IComparable$1);var System$IEquatable$1={fullname:"System.IEquatable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IEquatable$1);var System$IFormattable={fullname:"System.IFormattable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$IFormattable);Date.prototype.CompareTo=function(value){return this.valueOf()-value.valueOf();};Date.prototype.get_Year=function(){if(this._Kind==1)return this.getUTCFullYear();else null;return this.getFullYear();};Date.prototype.set_Year=function(value){if(this._Kind==1)this.setUTCFullYear(value);else this.setFullYear(value);};Date.prototype.get_Month=function(){if(this._Kind==1)return this.getUTCMonth()+1;else null;return this.getMonth()+1;};Date.prototype.set_Month=function(value){if(this._Kind==1)this.setUTCMonth(value-1);else this.setMonth(value-1);};Date.prototype.get_Day=function(){if(this._Kind==1)return this.getUTCDate();else null;return this.getDate();};Date.prototype.set_Day=function(value){if(this._Kind==1)this.setUTCDate(value);else this.setDate(value);};Date.prototype.get_Hour=function(){if(this._Kind==1)return this.getUTCHours();else null;return this.getHours();};Date.prototype.set_Hour=function(value){if(this._Kind==1)this.setUTCHours(value);else this.setHours(value);};Date.prototype.get_Minute=function(){if(this._Kind==1)return this.getUTCMinutes();else null;return this.getMinutes();};Date.prototype.set_Minute=function(value){if(this._Kind==1)this.setUTCMinutes(value);else this.setMinutes(value);};Date.prototype.get_Second=function(){if(this._Kind==1)return this.getUTCSeconds();else null;return this.getSeconds();};Date.prototype.set_Second=function(value){if(this._Kind==1)this.setUTCSeconds(value);else this.setSeconds(value);};Date.prototype.get_Millisecond=function(){if(this._Kind==1)return this.getUTCMilliseconds();else null;return this.getMilliseconds();};Date.prototype.set_Millisecond=function(value){if(this._Kind==1)this.setUTCMilliseconds(value);else this.setMilliseconds(value);};Date.prototype.get_Ticks=function(){if(this._Kind==1)return this.getUTCMilliseconds()*10000;else null;return this.getMilliseconds()*10000;};Date.prototype.set_Ticks=function(value){var milliseconds=value/10000;if(this._Kind==1)this.setUTCMilliseconds(milliseconds);else this.setMilliseconds(milliseconds);};Date.prototype.get_DayOfWeek=function(){return this.getDay();};Date.prototype.ToLocalTime=function(){if(this._Kind!=1)return this;else null;var x=this.Clone();x._Kind=2;return x;};Date.prototype.ToUniversalTime=function(){if(this._Kind==1)return this;else null;var x=this.Clone();x._Kind=1;return x;};Date.get_Today=function(){return new Date().RemoveTime();};Date.prototype.Subtract$$DateTime=function(value){var diff=this.valueOf()-value.valueOf();return new System.TimeSpan.ctor$$Int64(diff*10000);};Date.prototype.Subtract$$TimeSpan=function(value){var newDate=this.Clone();newDate.setMilliseconds(this.getMilliseconds()+value.get_TotalMilliseconds());return newDate;};Date.prototype.ToString$$String=function(format){format=format.Replace$$String$$String("yyyy",this.get_Year().ToString$$String("0000"));format=format.Replace$$String$$String("yy",this.get_Year().ToString$$String("00"));format=format.Replace$$String$$String("y",this.get_Year().toString());format=format.Replace$$String$$String("MM",this.get_Month().ToString$$String("00"));format=format.Replace$$String$$String("M",this.get_Month().toString());format=format.Replace$$String$$String("dd",this.get_Day().ToString$$String("00"));format=format.Replace$$String$$String("d",this.get_Day().toString());format=format.Replace$$String$$String("HH",this.get_Hour().ToString$$String("00"));format=format.Replace$$String$$String("H",this.get_Hour().toString());format=format.Replace$$String$$String("mm",this.get_Minute().ToString$$String("00"));format=format.Replace$$String$$String("m",this.get_Minute().toString());format=format.Replace$$String$$String("ss",this.get_Second().ToString$$String("00"));format=format.Replace$$String$$String("s",this.get_Second().toString());return format;};Date.prototype.Clone=function(){var x=new Date(this +.valueOf());x._Kind=this._Kind;return x;};Date.prototype.Clone2=function(totalMs){var x=new Date(totalMs);x._Kind=this._Kind;return x;};Date.prototype.AddMilliseconds=function(miliseconds){var date2=this.Clone2(this.valueOf()+miliseconds);return date2;};Date.prototype.AddSeconds=function(seconds){var ms=this.valueOf()+(seconds*1000);var date2=this.Clone2(ms);return date2;};Date.prototype.AddMinutes=function(minutes){var date2=this.Clone();date2.setMinutes(date2.getMinutes()+minutes);return date2;};Date.prototype.AddHours=function(hours){var date2=this.Clone();date2.setHours(date2.getHours()+hours);return date2;};Date.prototype.AddDays=function(days){var date2=this.Clone();date2.setDate(date2.getDate()+days);return date2;};Date.prototype.AddMonths=function(months){var date2=this.Clone();date2.setMonth(date2.getMonth()+months);return date2;};Date.prototype.AddYears=function(years){var date2=this.Clone();date2.setMonth(date2.getFullYear()+years);return date2;};Date.prototype.RemoveTime=function(){var date2=this.Clone();date2.setHours(0,0,0,0);return date2;};Date.prototype.Equals$$Object=function(obj){if(obj==null)return false;else null;return obj.valueOf()==this.valueOf();};Date.prototype.GetHashCode=function(){return this.valueOf();};Date.prototype.GetType=function(){return Typeof(System.DateTime.ctor);};Date.prototype.get_Kind=function(){if(this._Kind==null)return 2;else null;return this._Kind;};Number.prototype.CompareTo$$Double=function(value){if(thisvalue)return 1;else null;if(this==value)return 0;else null;if(!System.Double.IsNaN(this))return 1;else null;return !System.Double.IsNaN(value)?-1:0;};Number.prototype.CompareTo$$Int32=function(value){if(thisvalue?1:0;};var System$Nullable$1={fullname:"System.Nullable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T,value){this.T=T;this.hasValue=false;this.value=null;System.Object.ctor.call(this);this.value=value;this.hasValue=true;},HasValue$$:"System.Boolean",get_HasValue:function(){return this.hasValue;},Value$$:"`0",get_Value:function(){if(!this.get_HasValue()){throw $CreateException(new System.InvalidOperationException.ctor$$String("InvalidOperation_NoValue"),new Error());}else null;return this.value;},GetValueOrDefault:function(){return this.value;},GetValueOrDefault$$T:function(defaultValue){if(!this.get_HasValue()){return defaultValue;}else null;return this.value;},Equals$$Object:function(other){if(!this.get_HasValue()){return (other==null);}else null;if(other==null){return false;}else null;return this.value.Equals$$Object(other);},GetHashCode:function(){if(!this.get_HasValue()){return 0;}else null;return this.value.GetHashCode();},toString:function(){if(!this.get_HasValue()){return "";}else null;return this.value.toString();}}};JsTypes.push(System$Nullable$1);var System$Random={fullname:"System.Random",baseTypeName:"System.Object",staticDefinition:{cctor:function(){System.Random.MBIG=2147483647;System.Random.MSEED=161803398;System.Random.MZ=0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.inext=0;this.inextp=0;this.SeedArray=new Int32Array(56);System.Random.ctor$$Int32.call(this,System.Environment.get_TickCount());},ctor$$Int32:function(Seed){this.inext=0;this.inextp=0;this.SeedArray=new Int32Array(56);System.Object.ctor.call(this);var num=161803398-System.Math.Abs$$Int32(Seed);this.SeedArray[55]=num;var num2=1;for(var i=1;i<55;i++){var num3=21*i%55;this.SeedArray[num3]=num2;num2=num-num2;if(num2<0){num2+=2147483647;}else null;num=this.SeedArray[num3];}for(var j=1;j<5;j++){for(var k=1;k<56;k++){this.SeedArray[k]-=this.SeedArray[1+(k+30)%55];if(this.SeedArray[k]<0){this.SeedArray[k]+=2147483647;}else null;}}this.inext=0;this.inextp=21;Seed=1;},Sample:function(){return this.InternalSample()*4.6566128752458E-10;},InternalSample:function(){var num=this.inext;var num2=this.inextp;if(++num>=56){num=1;}else null;if(++num2>=56){num2=1;}else null;var num3=this.SeedArray[num]-this.SeedArray[num2];if(num3<0){num3+=2147483647;}else null;this.SeedArray[num]=num3;this.inext=num;this.inextp=num2;return num3;},Next:function(){return this.InternalSample();},GetSampleForLargeRange:function(){var num=this.InternalSample();var flag=this.InternalSample()%2==0;if(flag){num=-num;}else null;var num2=num;num2+=2147483646;return num2/4294967293;},Next$$Int32$$Int32:function(minValue,maxValue){if(minValue>maxValue){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("minValue","Argument_MinMaxValue"),new Error());}else null;var num=maxValue-minValue;if(num<=2147483647){return (this.Sample()*num)+minValue;}else null;return ((this.GetSampleForLargeRange()*num)+minValue);},Next$$Int32:function(maxValue){if(maxValue<0){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String("maxValue","ArgumentOutOfRange_MustBePositive"),new Error());}else null;return (this.Sample()*maxValue);},NextDouble:function(){return this.Sample();},NextBytes:function(buffer){if(buffer==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("buffer"),new Error());}else null;for(var i=0;i=this.str.length){throw $CreateException(new System.InvalidOperationException.ctor$$String("Enum Ended"),new Error());}else null;return this.currentElement;}}};JsTypes.push(System$CharEnumerator);var System$StringComparison={fullname:"System.StringComparison",staticDefinition:{CurrentCulture:0,CurrentCultureIgnoreCase:1,InvariantCulture:2,InvariantCultureIgnoreCase +:3,Ordinal:4,OrdinalIgnoreCase:5},Kind:"Enum"};JsTypes.push(System$StringComparison);var System$TimeSpan={fullname:"System.TimeSpan",baseTypeName:"System.Object",staticDefinition:{cctor:function(){System.TimeSpan.TicksPerMillisecond=10000;System.TimeSpan.MillisecondsPerTick=0.0001;System.TimeSpan.TicksPerSecond=10000000;System.TimeSpan.SecondsPerTick=1E-07;System.TimeSpan.TicksPerMinute=600000000;System.TimeSpan.MinutesPerTick=1.66666666666667E-09;System.TimeSpan.TicksPerHour=36000000000;System.TimeSpan.HoursPerTick=2.77777777777778E-11;System.TimeSpan.TicksPerDay=864000000000;System.TimeSpan.DaysPerTick=1.15740740740741E-12;System.TimeSpan.MillisPerSecond=1000;System.TimeSpan.MillisPerMinute=60000;System.TimeSpan.MillisPerHour=3600000;System.TimeSpan.MillisPerDay=86400000;System.TimeSpan.MaxSeconds=922337203685;System.TimeSpan.MinSeconds=-922337203685;System.TimeSpan.MaxMilliSeconds=922337203685477;System.TimeSpan.MinMilliSeconds=-922337203685477;System.TimeSpan.TicksPerTenthSecond=1000000;System.TimeSpan.Zero=new System.TimeSpan.ctor$$Int64(0);System.TimeSpan.MaxValue=new System.TimeSpan.ctor$$Int64(9223372036854775807);System.TimeSpan.MinValue=new System.TimeSpan.ctor$$Int64(-9223372036854775808);},Compare:function(t1,t2){if(t1.get__ticks()>t2.get__ticks()){return 1;}else null;if(t1.get__ticks()=0)?0.5:-0.5);if(num2>922337203685477||num2<-922337203685477){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"),new Error());}else null;return new System.TimeSpan.ctor$$Int64((num2*10000));},FromMilliseconds:function(value){var ts=new System.TimeSpan.ctor();ts._TotalMilliseconds=value;return ts;},FromMinutes:function(value){return System.TimeSpan.Interval(value,60000);},FromSeconds:function(value){return System.TimeSpan.Interval(value,1000);},FromTicks:function(value){return new System.TimeSpan.ctor$$Int64(value);},TimeToTicks:function(hour,minute,second){var num=hour*3600+minute*60+second;if(num>922337203685||num<-922337203685){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}else null;return num*10000000;},TimeToMs:function(hour,minute,second){var num=hour*3600+minute*60+second;if(num>922337203685||num<-922337203685){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}else null;return num*1000;},op_UnaryNegation:function(t){if(t.get__ticks()==System.TimeSpan.MinValue.get__ticks()){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"),new Error());}else null;return new System.TimeSpan.ctor$$Int64(-t.get__ticks());},op_Subtraction:function(t1,t2){return t1.Subtract(t2);},op_UnaryPlus:function(t){return t;},op_Addition:function(t1,t2){return t1.Add(t2);},op_Equality:function(t1,t2){return t1.get__ticks()==t2.get__ticks();},op_Inequality:function(t1,t2){return t1.get__ticks()!=t2.get__ticks();},op_LessThan:function(t1,t2){return t1.get__ticks()t2.get__ticks();},op_GreaterThanOrEqual:function(t1,t2){return t1.get__ticks()>=t2.get__ticks();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._TotalMilliseconds=0;System.Object.ctor.call(this);},Ticks$$:"System.Int64",get_Ticks:function(){return (this._TotalMilliseconds*10000);},_ticks$$:"System.Int64",get__ticks:function(){return (this._TotalMilliseconds*10000);},Days$$:"System.Int32",get_Days:function(){return (this.get__ticks()/864000000000);},Hours$$:"System.Int32",get_Hours:function(){return (this.get__ticks()/36000000000%24);},Milliseconds$$:"System.Int32",get_Milliseconds:function(){return (this.get__ticks()/10000%1000);},Minutes$$:"System.Int32",get_Minutes:function(){return (this.get__ticks()/600000000%60);},Seconds$$:"System.Int32",get_Seconds:function(){return (this.get__ticks()/10000000%60);},TotalDays$$:"System.Double",get_TotalDays:function(){return this._TotalMilliseconds/86400000;},TotalHours$$:"System.Double",get_TotalHours:function(){return this._TotalMilliseconds/3600000;},TotalMilliseconds$$:"System.Double",get_TotalMilliseconds:function(){return this._TotalMilliseconds;},TotalMinutes$$:"System.Double",get_TotalMinutes:function(){return this._TotalMilliseconds/60000;},TotalSeconds$$:"System.Double",get_TotalSeconds:function(){return this._TotalMilliseconds/1000;},ctor$$Int64:function(ticks){this._TotalMilliseconds=0;System.Object.ctor.call(this);this._TotalMilliseconds=ticks/10000;},ctor$$Int32$$Int32$$Int32:function(hours,minutes,seconds){this._TotalMilliseconds=0;System.Object.ctor.call(this);this._TotalMilliseconds=System.TimeSpan.TimeToMs(hours,minutes,seconds);},ctor$$Int32$$Int32$$Int32$$Int32:function(days,hours,minutes,seconds){this._TotalMilliseconds=0;System.TimeSpan.ctor$$Int32$$Int32$$Int32$$Int32$$Int32.call(this,days,hours,minutes,seconds,0);},ctor$$Int32$$Int32$$Int32$$Int32$$Int32:function(days,hours,minutes,seconds,milliseconds){this._TotalMilliseconds=0;System.Object.ctor.call(this);var num=(days*3600*24+hours*3600+minutes*60+seconds)*1000+milliseconds;if(num>922337203685477||num<-922337203685477){throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String$$String(null,"Overflow_TimeSpanTooLong"),new Error());}else null;this._TotalMilliseconds=num;},Add:function(ts){var num=this._TotalMilliseconds+ts._TotalMilliseconds;return System.TimeSpan.FromMilliseconds(num);},CompareTo$$Object:function(value){if(value==null){return 1;}else null;if(!(Is(value,System.TimeSpan.ctor))){throw $CreateException(new System.ArgumentException.ctor$$String("Arg_MustBeTimeSpan"),new Error());}else null;var ticks=(Cast(value,System.TimeSpan.ctor)).get__ticks();if(this.get__ticks()>ticks){return 1;}else null;if(this.get__ticks()ticks){return 1;}else null;if(this.get__ticks()=0)?this.get__ticks():(-this.get__ticks()));},Equals$$Object:function(value){return Is(value,System.TimeSpan.ctor)&&this.get__ticks +()==(Cast(value,System.TimeSpan.ctor)).get__ticks();},Equals$$TimeSpan:function(obj){return this.get__ticks()==obj.get__ticks();},GetHashCode:function(){return (this.get__ticks()^(this.get__ticks()>>32));},Negate:function(){if(this.get_Ticks()==System.TimeSpan.MinValue.get_Ticks()){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_NegateTwosCompNum"),new Error());}else null;return new System.TimeSpan.ctor$$Int64(-this.get__ticks());},Subtract:function(ts){var num=this.get__ticks()-ts.get__ticks();if(this.get__ticks()>>63!=ts.get__ticks()>>63&&this.get__ticks()>>63!=num>>63){throw $CreateException(new System.OverflowException.ctor$$String("Overflow_TimeSpanTooLong"),new Error());}else null;return new System.TimeSpan.ctor$$Int64(num);}}};JsTypes.push(System$TimeSpan);var System$Tuple={fullname:"System.Tuple",baseTypeName:"System.Object",staticDefinition:{Create$1$$T1:function(T1,item1){return new System.Tuple$1.ctor(T1,item1);},Create$2$$T1$$T2:function(T1,T2,item1,item2){return new System.Tuple$2.ctor(T1,T2,item1,item2);},Create$3$$T1$$T2$$T3:function(T1,T2,T3,item1,item2,item3){return new System.Tuple$3.ctor(T1,T2,T3,item1,item2,item3);},Create$4$$T1$$T2$$T3$$T4:function(T1,T2,T3,T4,item1,item2,item3,item4){return new System.Tuple$4.ctor(T1,T2,T3,T4,item1,item2,item3,item4);},Create$5$$T1$$T2$$T3$$T4$$T5:function(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5){return new System.Tuple$5.ctor(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5);},Create$6$$T1$$T2$$T3$$T4$$T5$$T6:function(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6){return new System.Tuple$6.ctor(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6);},Create$7$$T1$$T2$$T3$$T4$$T5$$T6$$T7:function(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7){return new System.Tuple$7.ctor(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7);},Create$8$$T1$$T2$$T3$$T4$$T5$$T6$$T7$$T8:function(T1,T2,T3,T4,T5,T6,T7,T8,item1,item2,item3,item4,item5,item6,item7,item8){return new System.Tuple$8.ctor(T1,T2,T3,T4,T5,T6,T7,System.Tuple$1.ctor,item1,item2,item3,item4,item5,item6,item7,new System.Tuple$1.ctor(T8,item8));}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Tuple);var System$Tuple$1={fullname:"System.Tuple$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,item1){this.T1=T1;this._item1=null;System.Object.ctor.call(this);this._item1=item1;},Item1$$:"`0",get_Item1:function(){return this._item1;}}};JsTypes.push(System$Tuple$1);var System$Tuple$2={fullname:"System.Tuple$2",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,item1,item2){this.T1=T1;this.T2=T2;this._item1=null;this._item2=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;}}};JsTypes.push(System$Tuple$2);var System$Tuple$3={fullname:"System.Tuple$3",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,item1,item2,item3){this.T1=T1;this.T2=T2;this.T3=T3;this._item1=null;this._item2=null;this._item3=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;}}};JsTypes.push(System$Tuple$3);var System$Tuple$4={fullname:"System.Tuple$4",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,item1,item2,item3,item4){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this._item1=null;this._item2=null;this._item3=null;this._item4=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;}}};JsTypes.push(System$Tuple$4);var System$Tuple$5={fullname:"System.Tuple$5",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,item1,item2,item3,item4,item5){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;}}};JsTypes.push(System$Tuple$5);var System$Tuple$6={fullname:"System.Tuple$6",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,T6,item1,item2,item3,item4,item5,item6){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this.T6=T6;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;this._item6=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;this._item6=item6;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;},Item6$$:"`5",get_Item6:function(){return this._item6;}}};JsTypes.push(System$Tuple$6);var System$Tuple$7={fullname:"System.Tuple$7",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(T1,T2,T3,T4,T5,T6,T7,item1,item2,item3,item4,item5,item6,item7){this.T1=T1;this.T2=T2;this.T3=T3;this.T4=T4;this.T5=T5;this.T6=T6;this.T7=T7;this._item1=null;this._item2=null;this._item3=null;this._item4=null;this._item5=null;this._item6=null;this._item7=null;System.Object.ctor.call(this);this._item1=item1;this._item2=item2;this._item3=item3;this._item4=item4;this._item5=item5;this._item6=item6;this._item7=item7;},Item1$$:"`0",get_Item1:function(){return this._item1;},Item2$$:"`1",get_Item2:function(){return this._item2;},Item3$$:"`2",get_Item3:function(){return this._item3;},Item4$$:"`3",get_Item4:function(){return this._item4;},Item5$$:"`4",get_Item5:function(){return this._item5;},Item6$$:"`5",get_Item6:function(){return this._item6;},Item7$$:"`6",get_Item7:function(){return this._item7;}}};JsTypes.push(System$Tuple$7);var System$UInt32={fullname:"System.UInt32",baseTypeName:"System.Object",staticDefinition:{op_Implicit$$UInt32:function(value){return value._value;},op_Explicit:function(value){return + new System.UInt32.ctor$$Object(value);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._value=null;System.UInt32.ctor$$Object.call(this,0);},ctor$$Object:function(value){this._value=null;System.Object.ctor.call(this);this._value=this.Convert(value);},Convert:function(value){if(value==null)throw $CreateException(new System.ArgumentNullException.ctor(),new Error());else null;var regex=new RegExp("^-?([0-9]+)[^0-9]");var match=regex.exec(value.toString());if(match==null)throw $CreateException(new System.FormatException.ctor(),new Error());else null;return new Number(match[1]);}}};JsTypes.push(System$UInt32);var System$Uri={fullname:"System.Uri",baseTypeName:"System.Object",staticDefinition:{op_Equality:function(u1,u2){if(u1==u2){return true;}else null;if(u1==null){return false;}else null;if(u2==null){return false;}else null;return u1._OriginalString==u2._OriginalString;},op_Inequality:function(u1,u2){return !(System.Uri.op_Equality(u1,u2));}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._OriginalString=null;this._Fragment=null;this._Query=null;System.Object.ctor.call(this);this._OriginalString=null;},ctor$$String:function(uri){this._OriginalString=null;this._Fragment=null;this._Query=null;System.Object.ctor.call(this);this._OriginalString=uri;},OriginalString$$:"System.String",get_OriginalString:function(){return this._OriginalString;},AbsoluteUri$$:"System.String",get_AbsoluteUri:function(){return this._OriginalString;},toString:function(){return this._OriginalString;},Equals$$Object:function(obj){return System.Uri.op_Equality(this,Cast(obj,System.Uri.ctor));},GetHashCode:function(){return System.Object.commonPrototype.GetHashCode.call(this);},Fragment$$:"System.String",get_Fragment:function(){if(this._Fragment==null){var idx=this._OriginalString.indexOf("#");if(idx==-1)this._Fragment="";else this._Fragment=this._OriginalString.substr(idx);}else null;return this._Fragment;},Query$$:"System.String",get_Query:function(){if(this._Query==null){var idx=this._OriginalString.indexOf("?");if(idx==-1)this._Query="";else {var idx2=this._OriginalString.indexOf("#");if(idx2==-1)this._Query=this._OriginalString.substr(idx);else this._Query=this._OriginalString.substr(idx,idx2-idx);}}else null;return this._Query;}}};JsTypes.push(System$Uri);var System$ValueType={fullname:"System.ValueType",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$ValueType);var SharpKit$Html4$HtmlDomEventHandler={fullname:"SharpKit.Html4.HtmlDomEventHandler",Kind:"Delegate",definition:{ctor:function(obj,func){System.MulticastDelegate.ctor.call(this,obj,func);}}};JsTypes.push(SharpKit$Html4$HtmlDomEventHandler);var JsRuntime=function(){};JsRuntime.Start=function(){Compile();}; //kernel.js var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; @@ -1038,29 +1038,29 @@ AfterCompilation(function() { System.IO.Path.ctor(); }); -if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$IO$Path={fullname:"System.IO.Path",baseTypeName:"System.Object",staticDefinition:{cctor:function(){System.IO.Path.AltDirectorySeparatorChar="/";System.IO.Path.DirectorySeparatorChar="\\";System.IO.Path.InvalidFileNameChars=["\"","<",">","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","","",":","*","?","\\","/"];System.IO.Path.InvalidPathChars=["\"","<",">","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","",""];System.IO.Path.MAX_DIRECTORY_PATH=248;System.IO.Path.MAX_PATH=260;System.IO.Path.MaxPath=260;System.IO.Path.PathSeparator=";";System.IO.Path.RealInvalidPathChars=["\"","<",">","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","",""];System.IO.Path.VolumeSeparatorChar=":";},ChangeExtension:function(path,extension){if(path==null){return null;}System.IO.Path.CheckInvalidPathChars(path);var str=path;var length=path.length;while(--length>=0){var ch=path.charAt(length);if(ch=="."){str=path.substr(0,length);break;}if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}}if((extension==null)||(path.length==0)){return str;}if((extension.length==0)||(extension.charAt(0)!=".")){str=str+".";}return (str+extension);},CharArrayStartsWithOrdinal:function(array,numChars,compareTo,ignoreCase){if(numCharsrootLength){var length=path.length;if(length==rootLength){return null;}while(((length>rootLength)&&(path.charAt(--length)!=System.IO.Path.DirectorySeparatorChar))&&(path.charAt(length)!=System.IO.Path.AltDirectorySeparatorChar)){}return path.substr(0,length);}}return null;},GetExtension:function(path){if(path==null){return null;}System.IO.Path.CheckInvalidPathChars(path);var length=path.length;var startIndex=length;while(--startIndex>=0){var ch=path.charAt(startIndex);if(ch=="."){if(startIndex!=(length-1)){return path.substr(startIndex,length-startIndex);}return System.String.Empty;}if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}}return System.String.Empty;},GetFileName:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars(path);var length=path.length;var num2=length;while(--num2>=0){var ch=path.charAt(num2);if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){return path.substr(num2+1,(length-num2)-1);}}}return path;},GetFileNameWithoutExtension:function(path){path=System.IO.Path.GetFileName(path);if(path==null){return null;}var length=path.lastIndexOf(".");if(length==-1){return path;}return path.substr(0,length);},GetFullPath:function(path){var fullPathInternal=System.IO.Path.GetFullPathInternal(path);return fullPathInternal;},GetFullPathInternal:function(path){if(path==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("path"),new Error());}return System.IO.Path.NormalizePath(path,true);},GetInvalidFileNameChars:function(){return System.IO.Path.InvalidFileNameChars;},GetInvalidPathChars:function(){return System.IO.Path.RealInvalidPathChars;},GetPathRoot:function(path){if(path==null){return null;}path=System.IO.Path.FixupPath(path);return path.substr(0,System.IO.Path.GetRootLength(path));},GetRandomFileName:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},GetRootLength:function(path){System.IO.Path.CheckInvalidPathChars(path);var num=0;var length=path.length;if((length>=1)&&System.IO.Path.IsDirectorySeparator(path.charAt(0))){num=1;if((length>=2)&&System.IO.Path.IsDirectorySeparator(path.charAt(1))){num=2;var num3=2;while((num0))){num++;}}return num;}if((length>=2)&&(path.charAt(1)==System.IO.Path.VolumeSeparatorChar)){num=2;if((length>=3)&&System.IO.Path.IsDirectorySeparator(path.charAt(2))){num++;}}return num;},GetTempFileName:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},GetTempPath:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},HasExtension:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars(path);var length=path.length;while(--length>=0){var ch=path.charAt(length);if(ch=="."){return (length!=(path.length-1));}if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}}}return false;},InternalCombine:function(path1,path2) -{if((path1==null)||(path2==null)){throw $CreateException(new System.ArgumentNullException.ctor$$String((path1==null)?"path1":"path2"),new Error());}System.IO.Path.CheckInvalidPathChars(path1);System.IO.Path.CheckInvalidPathChars(path2);if(path2.length==0){throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Argument_PathEmpty"),"path2"),new Error());}if(System.IO.Path.IsPathRooted(path2)){throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Arg_Path2IsRooted"),"path2"),new Error());}var length=path1.length;if(length==0){return path2;}var ch=path1.charAt(length-1);if(((ch!=System.IO.Path.DirectorySeparatorChar)&&(ch!=System.IO.Path.AltDirectorySeparatorChar))&&(ch!=System.IO.Path.VolumeSeparatorChar)){return (path1+System.IO.Path.DirectorySeparatorChar+path2);}return (path1+path2);},IsDirectorySeparator:function(c){if(c!=System.IO.Path.DirectorySeparatorChar){return (c==System.IO.Path.AltDirectorySeparatorChar);}return true;},IsPathRooted:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars(path);var length=path.length;if(((length>=1)&&((path.charAt(0)==System.IO.Path.DirectorySeparatorChar)||(path.charAt(0)==System.IO.Path.AltDirectorySeparatorChar)))||((length>=2)&&(path.charAt(1)==System.IO.Path.VolumeSeparatorChar))){return true;}}return false;},NormalizePath:function(path,fullCheck){return System.IO.Path.NormalizePathSlow(path,fullCheck);},NormalizePathSlow:function(path,fullCheck){return path;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$IO$Path); -if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Linq$Enumerable={fullname:"System.Linq.Enumerable",baseTypeName:"System.Object",staticDefinition:{CombinePredicates$1:function(TSource,predicate1,predicate2){return function(x){return predicate1(x)&&predicate2(x);};},CombineSelectors$3:function(TSource,TMiddle,TResult,selector1,selector2){return function(x){return selector2(selector1(x));};},First$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()>0){return list.get_Item$$Int32(0);}}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return enumerator.get_Current();}}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},First$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var $it5=source.GetEnumerator();while($it5.MoveNext()){var local=$it5.get_Current();if(predicate(local)){return local;}}throw $CreateException(System.Linq.Error.NoMatch(),new Error());},FirstOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()>0){return list.get_Item$$Int32(0);}}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return enumerator.get_Current();}}finally{enumerator.Dispose();}}return Default(TSource);},FirstOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var $it6=source.GetEnumerator();while($it6.MoveNext()){var local=$it6.get_Current();if(predicate(local)){return local;}}return Default(TSource);},Single$1$$IEnumerable$1:function(TSource,source){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()==1)return list.get_Item$$Int32(0);else throw $CreateException(new System.InvalidOperationException.ctor(),new Error());}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext())return enumerator.get_Current();}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},Single$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());if(predicate==null)throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());var $it7=source.GetEnumerator();while($it7.MoveNext()){var local=$it7.get_Current();if(predicate(local))return local;}throw $CreateException(System.Linq.Error.NoMatch(),new Error());},SingleOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()==1)return list.get_Item$$Int32(0);else throw $CreateException(new System.InvalidOperationException.ctor(),new Error());}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext())return enumerator.get_Current();}finally{enumerator.Dispose();}}return Default(TSource);},SingleOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());if(predicate==null)throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());var $it8=source.GetEnumerator();while($it8.MoveNext()){var local=$it8.get_Current();if(predicate(local))return local;}return Default(TSource);},Last$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){var count=list.get_Count();if(count>0){return list.get_Item$$Int32(count-1);}}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){var current;do{current=enumerator.get_Current();}while(enumerator.MoveNext())return current;}}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},Last$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var local=Default(TSource);var flag=false;var $it9=source.GetEnumerator();while($it9.MoveNext()){var local2=$it9.get_Current();if(predicate(local2)){local=local2;flag=true;}}if(!flag){throw $CreateException(System.Linq.Error.NoMatch(),new Error());}return local;},LastOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){var count=list.get_Count();if(count>0){return list.get_Item$$Int32(count-1);}}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){var current;do{current=enumerator.get_Current();}while(enumerator.MoveNext())return current;}}finally{enumerator.Dispose();}}return Default(TSource);},LastOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var local=Default(TSource);var $it10=source.GetEnumerator();while($it10.MoveNext()){var local2=$it10.get_Current();if(predicate(local2)){local=local2;}}return local;},Where$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}if(Is(source,System.Linq.Enumerable.Iterator.ctor)){return (Cast(source,System.Linq.Enumerable.Iterator.ctor)).Where(predicate);}if(source instanceof Array){return new System.Linq.Enumerable.WhereArrayIterator.ctor(TSource,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),predicate);}if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.WhereListIterator.ctor(TSource,Cast(source,System.Collections.Generic.List$1.ctor),predicate);}return new System.Linq.Enumerable.WhereEnumerableIterator -.ctor(TSource,source,predicate);},Where$1$$IEnumerable$1$$Func$3:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Contains$1$$IEnumerable$1$$TSource:function(TSource,source,value){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());var is2=As(source,System.Collections.Generic.ICollection$1.ctor);if(is2!=null)return is2.Contains(value);var $it11=source.GetEnumerator();while($it11.MoveNext()){var local=$it11.get_Current();if(local==value)return true;}return false;},Contains$1$$IEnumerable$1$$TSource$$IEqualityComparer$1:function(TSource,source,value,comparer){if(comparer==null){return System.Linq.Enumerable.Contains$1$$IEnumerable$1$$TSource(TSource,source,value);}if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var $it12=source.GetEnumerator();while($it12.MoveNext()){var local=$it12.get_Current();if(comparer.Equals$$T$$T(local,value)){return true;}}return false;},Any$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return true;}}finally{enumerator.Dispose();}return false;},Any$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var $it13=source.GetEnumerator();while($it13.MoveNext()){var local=$it13.get_Current();if(predicate(local)){return true;}}return false;},Concat$1:function(TSource,first,second){if(first==null){throw $CreateException(System.Linq.Error.ArgumentNull("first"),new Error());}if(second==null){throw $CreateException(System.Linq.Error.ArgumentNull("second"),new Error());}return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerable$1.ctor(TSource,first,second);},Count$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var is2=As(source,System.Collections.Generic.ICollection$1.ctor);if(is2!=null){return is2.get_Count();}var num=0;var enumerator=source.GetEnumerator();try{while(enumerator.MoveNext()){num++;}}finally{enumerator.Dispose();}return num;},Count$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}var num=0;var $it14=source.GetEnumerator();while($it14.MoveNext()){var local=$it14.get_Current();if(predicate(local)){num++;}}return num;},OfType$1:function(TResult,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return new System.Linq.Enumerable.OfTypeIterator.ctor(TResult,source);},OrderBy$2$$IEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,null,false);},OrderBy$2$$IEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,comparer,false);},OrderByDescending$2$$IEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,null,true);},OrderByDescending$2$$IEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,comparer,true);},ThenBy$2$$IOrderedEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return source.CreateOrderedEnumerable$1(TKey,keySelector,null,false);},ThenBy$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return source.CreateOrderedEnumerable$1(TKey,keySelector,comparer,false);},ThenByDescending$2$$IOrderedEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return source.CreateOrderedEnumerable$1(TKey,keySelector,null,true);},ThenByDescending$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return source.CreateOrderedEnumerable$1(TKey,keySelector,comparer,true);},Select$2$$IEnumerable$1$$Func$2:function(TSource,TResult,source,selector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(selector==null){throw $CreateException(System.Linq.Error.ArgumentNull("selector"),new Error());}if(Is(source,System.Linq.Enumerable.Iterator.ctor)){return (Cast(source,System.Linq.Enumerable.Iterator.ctor)).Select$1(TResult,selector);}if(source instanceof Array){return new System.Linq.Enumerable.WhereSelectArrayIterator.ctor(TSource,TResult,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),null,selector);}if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.WhereSelectListIterator.ctor(TSource,TResult,Cast(source,System.Collections.Generic.List$1.ctor),null,selector);}return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(TSource,TResult,source,null,selector);},Select$2$$IEnumerable$1$$Func$3:function(TSource,TResult,source,selector){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},SelectMany$2$$IEnumerable$1$$Func$2:function(TSource,TResult,source,selector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(selector==null){throw $CreateException(System.Linq.Error.ArgumentNull("selector"),new Error());}if(source instanceof Array){return new System.Linq.Enumerable.SelectManyArrayIterator.ctor(TSource,TResult,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),selector);}if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.SelectManyListIterator.ctor(TSource,TResult,Cast(source,System.Collections.Generic.List$1.ctor),selector);}return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(TSource,TResult,source,selector);},SelectMany$2$$IEnumerable$1$$Func$3:function(TSource,TResult,source,selector){throw $CreateException(new System.NotImplementedException -.ctor(),new Error());},SelectMany$3$$IEnumerable$1$$Func$2$$Func$3:function(TSource,TCollection,TResult,source,collectionSelector,resultSelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}if(collectionSelector==null){throw $CreateException(System.Linq.Error.ArgumentNull("collectionSelector"),new Error());}if(resultSelector==null){throw $CreateException(System.Linq.Error.ArgumentNull("resultSelector"),new Error());}return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(System.Tuple$2.ctor,TResult,System.Linq.Enumerable.SelectMany$2$$IEnumerable$1$$Func$2(TSource,System.Tuple$2.ctor,source,function(t){return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(TCollection,System.Tuple$2.ctor,collectionSelector(t),function(x){return System.Tuple.Create$2$$T1$$T2(TSource,TCollection,t,x);});}),function(pair){return resultSelector(pair.get_Item1(),pair.get_Item2());});},Skip$1:function(TSource,source,count){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var x=new System.Linq.Enumerable.SkipIterator.ctor(TSource,source,count);return x;},Take$1:function(TSource,source,count){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var x=new System.Linq.Enumerable.TakeIterator.ctor(TSource,source,count);return x;},ToArray$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}var arr= [];var $it15=source.GetEnumerator();while($it15.MoveNext()){var obj=$it15.get_Current();arr.push(obj);}return arr;},ToList$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}return new System.Collections.Generic.List$1.ctor$$IEnumerable$1(TSource,source);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$Enumerable);var System$Linq$_Error={fullname:"System.Linq._Error",baseTypeName:"System.Object",staticDefinition:{ArgumentArrayHasTooManyElements:function(p0){return new System.ArgumentException.ctor$$String("ArgumentArrayHasTooManyElements(p0");},ArgumentNotIEnumerableGeneric:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotIEnumerableGeneric(p0");},ArgumentNotSequence:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotSequence(p0");},ArgumentNotValid:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotValid(p0");},IncompatibleElementTypes:function(){return new System.ArgumentException.ctor$$String("IncompatibleElementTypes");},ArgumentNotLambda:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotLambda(p0");},MoreThanOneElement:function(){return new System.InvalidOperationException.ctor$$String("MoreThanOneElement");},MoreThanOneMatch:function(){return new System.InvalidOperationException.ctor$$String("MoreThanOneMatch");},NoArgumentMatchingMethodsInQueryable:function(p0){return new System.InvalidOperationException.ctor$$String("NoArgumentMatchingMethodsInQueryable(p0");},NoElements:function(){return new System.InvalidOperationException.ctor$$String("NoElements");},NoMatch:function(){return new System.InvalidOperationException.ctor$$String("NoMatch");},NoMethodOnType:function(p0,p1){return new System.InvalidOperationException.ctor$$String("NoMethodOnType(p0, p1");},NoMethodOnTypeMatchingArguments:function(p0,p1){return new System.InvalidOperationException.ctor$$String("NoMethodOnTypeMatchingArguments(p0, p1");},NoNameMatchingMethodsInQueryable:function(p0){return new System.InvalidOperationException.ctor$$String("NoNameMatchingMethodsInQueryable(p0");},ArgumentNull:function(paramName){return new System.ArgumentNullException.ctor$$String(paramName);},ArgumentOutOfRange:function(paramName){return new System.ArgumentOutOfRangeException.ctor$$String(paramName);},NotImplemented:function(){return new System.NotImplementedException.ctor();},NotSupported:function(){return new System.NotSupportedException.ctor();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$_Error);var System$Linq$IGrouping$2={fullname:"System.Linq.IGrouping$2",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Interface"};JsTypes.push(System$Linq$IGrouping$2);var System$Linq$IOrderedEnumerable$1={fullname:"System.Linq.IOrderedEnumerable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Interface"};JsTypes.push(System$Linq$IOrderedEnumerable$1);var System$Linq$Error={fullname:"System.Linq.Error",baseTypeName:"System.Object",staticDefinition:{ArgumentNull:function(p){return new System.Exception.ctor$$String("ArgumentNull "+p);},NoElements:function(){return new System.Exception.ctor$$String("NoElements");},NoMatch:function(){return new System.Exception.ctor$$String("NoMatch");}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$Error);var System$Linq$_OrderedEnumerable$1={fullname:"System.Linq._OrderedEnumerable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Linq.IOrderedEnumerable$1","System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Class",definition:{ctor:function(TElement){this.TElement=TElement;this.source=null;this.sorted=null;System.Object.ctor.call(this);},GetEnumerator:function(){if(this.sorted==null)this.sorted=this.SortSource();return this.sorted.GetEnumerator();},SortSource:function(){var list=System.Linq.Enumerable.ToArray$1(this.TElement,this.source);list.sort($CreateDelegate(this,this.Compare));return list;},CreateOrderedEnumerable$1:function(TKey,keySelector,comparer,descending){return (function(){var $v1=new System.Linq._OrderedEnumerable$2.ctor(this.TElement,TKey,this.source,keySelector,comparer,descending);$v1.parent=this;return $v1;}).call(this);}}};JsTypes.push(System$Linq$_OrderedEnumerable$1);var System$Linq$_OrderedEnumerable$2={fullname:"System.Linq._OrderedEnumerable$2",baseTypeName:"System.Linq._OrderedEnumerable$1",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TElement,TKey,source,keySelector,comparer,descending){this.TElement=TElement;this.TKey=TKey;this.parent=null;this.keySelector=null;this.comparer=null;this.descending=false;System.Linq._OrderedEnumerable$1.ctor.call(this,this.TElement);if(source==null){throw $CreateException(System.Linq._Error.ArgumentNull("source"),new Error());}if(keySelector==null){throw $CreateException(System.Linq._Error.ArgumentNull("keySelector"),new Error());}this.source=source;this.keySelector=keySelector;this.comparer=((comparer!=null)?comparer:System.Collections.Generic.Comparer$1 -.get_Default());this.descending=descending;},Compare:function(x,y){if(this.parent!=null){var z=this.parent.Compare(x,y);if(z!=0)return z;}var xx=this.keySelector(x);var yy=this.keySelector(y);var zz=this.comparer.Compare(xx,yy);if(this.descending)zz*=-1;return zz;}}};JsTypes.push(System$Linq$_OrderedEnumerable$2);var System$Linq$Enumerable$Iterator={fullname:"System.Linq.Enumerable.Iterator",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable","System.Collections.Generic.IEnumerator$1","System.IDisposable","System.Collections.IEnumerator"],Kind:"Class",definition:{ctor:function(TSource){this.TSource=TSource;this.state=0;this.current=null;System.Object.ctor.call(this);},Current$$:"`0",get_Current:function(){return this.current;},Dispose:function(){this.current=Default(this.TSource);this.state=-1;},GetEnumerator:function(){if(this.state==0){this.state=1;return this;}var iterator=this.Clone();iterator.state=1;return iterator;}}};JsTypes.push(System$Linq$Enumerable$Iterator);var System$Linq$Enumerable$SelectManyEnumerableIterator={fullname:"System.Linq.Enumerable.SelectManyEnumerableIterator",baseTypeName:"System.Linq.Enumerable.Iterator",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TSource,TResult,source,selector){this.TSource=TSource;this.TResult=TResult;this.source=null;this.selector=null;this.enumerator=null;this.innerEnumerator=null;System.Linq.Enumerable.Iterator.ctor.call(this,this.TResult);this.source=source;this.selector=selector;},Clone:function(){return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(this.TSource,this.TResult,this.source,this.selector);},Dispose:function(){if(this.enumerator!=null){this.enumerator.Dispose();}this.enumerator=null;System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this);},MoveNext:function(){switch(this.state){case 1:this.enumerator=this.source.GetEnumerator();this.state=2;break;case 2:break;default:return false;}while(true){if(this.innerEnumerator==null){if(this.enumerator.MoveNext()){this.innerEnumerator=this.selector(this.enumerator.get_Current()).GetEnumerator();}else {this.Dispose();return false;}}else {if(this.innerEnumerator.MoveNext()){this.current=this.innerEnumerator.get_Current();return true;}this.innerEnumerator=null;}}},Select$1:function(TResult2,selector){return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(this.TResult,TResult2,this,null,selector);},Where:function(predicate){return new System.Linq.Enumerable.WhereEnumerableIterator.ctor(this.TResult,this,predicate);}}};JsTypes.push(System$Linq$Enumerable$SelectManyEnumerableIterator);var System$Linq$Enumerable$SelectManyListIterator={fullname:"System.Linq.Enumerable.SelectManyListIterator",baseTypeName:"System.Linq.Enumerable.Iterator",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TSource,TResult,source,selector){this.TSource=TSource;this.TResult=TResult;this.source=null;this.selector=null;this.index=0;this.innerEnumerator=null;System.Linq.Enumerable.Iterator.ctor.call(this,this.TResult);this.source=source;this.selector=selector;},Clone:function(){return new System.Linq.Enumerable.SelectManyListIterator.ctor(this.TSource,this.TResult,this.source,this.selector);},MoveNext:function(){if(this.state==1){while(this.index=this._list.length||index<0)throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"),new Error());return this._list[index];},set_Item$$Int32:function(index,value){if(index>=this._list.length||index<0)throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"),new Error());this._list[index]=value;},Count$$:"System.Int32",get_Count:function(){return this._list.length;},GetEnumerator:function(){return new System.Collections.IListEnumerator$1.ctor(this.T,this);},ToArray:function(){var len=this.get_Count();var array=new Array(len);for(var i=0;i1)throw $CreateException(new System.InvalidOperationException.ctor$$String("Cannot modify the collection while reentrancy is blocked."),new Error());},ClearItems:function(){this.CheckReentrancy();System.Collections.ObjectModel.Collection$1.commonPrototype.ClearItems.call(this);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction(4));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},InsertItem:function(index,item){this.CheckReentrancy();System.Collections.ObjectModel.Collection$1.commonPrototype.InsertItem.call(this,index,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32(0,item,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},Move:function(oldIndex,newIndex){this.MoveItem(oldIndex,newIndex);},MoveItem:function(oldIndex,newIndex){this.CheckReentrancy();var item=this.get_Items().get_Item$$Int32(oldIndex);System.Collections.ObjectModel.Collection$1.commonPrototype.RemoveItem.call(this -,oldIndex);System.Collections.ObjectModel.Collection$1.commonPrototype.InsertItem.call(this,newIndex,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32$$Int32(3,item,newIndex,oldIndex));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},OnCollectionChanged:function(e){var eh=this.CollectionChanged;if(eh!=null){var $r1=this.BlockReentrancy();try{eh(this,e);}finally{$r1.Dispose();}}},OnPropertyChanged:function(e){var eh=this.PropertyChanged;if(eh!=null)eh(this,e);},RemoveItem:function(index){this.CheckReentrancy();var item=this.get_Items().get_Item$$Int32(index);System.Collections.ObjectModel.Collection$1.commonPrototype.RemoveItem.call(this,index);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32(1,item,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},SetItem:function(index,item){this.CheckReentrancy();var oldItem=this.get_Items().get_Item$$Int32(index);System.Collections.ObjectModel.Collection$1.commonPrototype.SetItem.call(this,index,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Object$$Int32(2,item,oldItem,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));}}};JsTypes.push(System$Collections$ObjectModel$ObservableCollection$1);var System$Collections$ObjectModel$ReadOnlyCollection$1={fullname:"System.Collections.ObjectModel.ReadOnlyCollection$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.ICollection$1","System.Collections.Generic.IList$1","System.Collections.Generic.IEnumerable$1","System.Collections.ICollection","System.Collections.IEnumerable","System.Collections.IList"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.list=null;System.Object.ctor.call(this);if(list==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("list"),new Error());this.list=list;},Contains:function(value){return this.list.Contains(value);},CopyTo:function(array,index){this.list.CopyTo(array,index);},GetEnumerator:function(){return this.list.GetEnumerator();},IndexOf:function(value){return this.list.IndexOf(value);},Count$$:"System.Int32",get_Count:function(){return this.list.get_Count();},Items$$:"System.Collections.Generic.IList`1[[`0]]",get_Items:function(){return this.list;},Item$$:"`0",get_Item$$Int32:function(index){return this.list.get_Item$$Int32(index);}}};JsTypes.push(System$Collections$ObjectModel$ReadOnlyCollection$1);var System$Collections$ObjectModel$ReadOnlyObservableCollection$1={fullname:"System.Collections.ObjectModel.ReadOnlyObservableCollection$1",baseTypeName:"System.Collections.ObjectModel.ReadOnlyCollection$1",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Specialized.INotifyCollectionChanged","System.ComponentModel.INotifyPropertyChanged"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.CollectionChanged=null;this.PropertyChanged=null;this.CollectionChanged=null;this.PropertyChanged=null;System.Collections.ObjectModel.ReadOnlyCollection$1.ctor.call(this,this.T,list);(list).add_PropertyChanged($CreateDelegate(this,this.SourceCollection_PropertyChanged));(list).add_CollectionChanged($CreateDelegate(this,this.SourceCollection_CollectionChanged));},add_CollectionChanged:function(value){this.CollectionChanged=$CombineDelegates(this.CollectionChanged,value);},remove_CollectionChanged:function(value){this.CollectionChanged=$RemoveDelegate(this.CollectionChanged,value);},add_PropertyChanged:function(value){this.PropertyChanged=$CombineDelegates(this.PropertyChanged,value);},remove_PropertyChanged:function(value){this.PropertyChanged=$RemoveDelegate(this.PropertyChanged,value);},OnCollectionChanged:function(args){var eh=this.CollectionChanged;if(eh!=null)eh(this,args);},OnPropertyChanged:function(args){var eh=this.PropertyChanged;if(eh!=null)eh(this,args);},SourceCollection_CollectionChanged:function(sender,e){this.OnCollectionChanged(e);},SourceCollection_PropertyChanged:function(sender,e){this.OnPropertyChanged(e);}}};JsTypes.push(System$Collections$ObjectModel$ReadOnlyObservableCollection$1);var System$Collections$IListEnumerator$1={fullname:"System.Collections.IListEnumerator$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerator$1"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.List=null;this.Index=0;this.ListCount=0;System.Object.ctor.call(this);this.List=list;this.Index=-1;this.ListCount=list.get_Count();},Current$$:"`0",get_Current:function(){return this.List.get_Item$$Int32(this.Index);},Dispose:function(){this.List=null;},MoveNext:function(){this.Index++;return this.Index0;}}};JsTypes.push(System$Collections$ObjectModel$ObservableCollection$1$Reentrant); -if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Reflection$BindingFlags={fullname:"System.Reflection.BindingFlags",staticDefinition:{CreateInstance:512,DeclaredOnly:2,Default:0,ExactBinding:65536,FlattenHierarchy:64,GetField:1024,GetProperty:4096,IgnoreCase:1,IgnoreReturn:16777216,Instance:4,InvokeMethod:256,NonPublic:32,OptionalParamBinding:262144,Public:16,PutDispProperty:16384,PutRefDispProperty:32768,SetField:2048,SetProperty:8192,Static:8,SuppressChangeType:131072},Kind:"Enum"};JsTypes.push(System$Reflection$BindingFlags);var System$Reflection$MemberInfo={fullname:"System.Reflection.MemberInfo",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._Name=null;this._DeclaringType=null;this._CustomAttributes=null;System.Object.ctor.call(this);},Name$$:"System.String",get_Name:function(){return this._Name;},DeclaringType$$:"SharpKit.JavaScript.Private.JsImplType",get_DeclaringType:function(){return this._DeclaringType;},VerifyCustomAttributes:function(){this.get_DeclaringType().VerifyCustomAttributesOnTypeAndMembers();},GetBaseMember:function(){return null;},AddCustomAttributes:function(list,attributeType,inherit){this.VerifyCustomAttributes();if(this._CustomAttributes!=null){for(var i=0;i","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","","",":","*","?","\\","/"];System.IO.Path.InvalidPathChars=["\"","<",">","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","",""];System.IO.Path.MAX_DIRECTORY_PATH=248;System.IO.Path.MAX_PATH=260;System.IO.Path.MaxPath=260;System.IO.Path.PathSeparator=";";System.IO.Path.RealInvalidPathChars=["\"","<",">","|","\0","","","","","","","","","\t","\n"," "," ","\r","","","","","","","","","","","","","","","","","",""];System.IO.Path.VolumeSeparatorChar=":";},ChangeExtension:function(path,extension){if(path==null){return null;}else null;System.IO.Path.CheckInvalidPathChars(path);var str=path;var length=path.length;while(--length>=0){var ch=path.charAt(length);if(ch=="."){str=path.substr(0,length);break;}else null;if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}else null;}if((extension==null)||(path.length==0)){return str;}else null;if((extension.length==0)||(extension.charAt(0)!=".")){str=str+".";}else null;return (str+extension);},CharArrayStartsWithOrdinal:function(array,numChars,compareTo,ignoreCase){if(numCharsrootLength){var length=path.length;if(length==rootLength){return null;}else null;while(((length>rootLength)&&(path.charAt(--length)!=System.IO.Path.DirectorySeparatorChar))&&(path.charAt(length)!=System.IO.Path.AltDirectorySeparatorChar)){}return path.substr(0,length);}else null;}else null;return null;},GetExtension:function(path){if(path==null){return null;}else null;System.IO.Path.CheckInvalidPathChars(path);var length=path.length;var startIndex=length;while(--startIndex>=0){var ch=path.charAt(startIndex);if(ch=="."){if(startIndex!=(length-1)){return path.substr(startIndex,length-startIndex);}else null;return System.String.Empty;}else null;if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}else null;}return System.String.Empty;},GetFileName:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars(path);var length=path.length;var num2=length;while(--num2>=0){var ch=path.charAt(num2);if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){return path.substr(num2+1,(length-num2)-1);}else null;}}else null;return path;},GetFileNameWithoutExtension:function(path){path=System.IO.Path.GetFileName(path);if(path==null){return null;}else null;var length=path.lastIndexOf(".");if(length==-1){return path;}else null;return path.substr(0,length);},GetFullPath:function(path){var fullPathInternal=System.IO.Path.GetFullPathInternal(path);return fullPathInternal;},GetFullPathInternal:function(path){if(path==null){throw $CreateException(new System.ArgumentNullException.ctor$$String("path"),new Error());}else null;return System.IO.Path.NormalizePath(path,true);},GetInvalidFileNameChars:function(){return System.IO.Path.InvalidFileNameChars;},GetInvalidPathChars:function(){return System.IO.Path.RealInvalidPathChars;},GetPathRoot:function(path){if(path==null){return null;}else null;path=System.IO.Path.FixupPath(path);return path.substr(0,System.IO.Path.GetRootLength(path));},GetRandomFileName:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},GetRootLength:function(path){System.IO.Path.CheckInvalidPathChars(path);var num=0;var length=path.length;if((length>=1)&&System.IO.Path.IsDirectorySeparator(path.charAt(0))){num=1;if((length>=2)&&System.IO.Path.IsDirectorySeparator(path.charAt(1))){num=2;var num3=2;while((num0))){num++;}}else null;return num;}else null;if((length>=2)&&(path.charAt(1)==System.IO.Path.VolumeSeparatorChar)){num=2;if((length>=3)&&System.IO.Path.IsDirectorySeparator(path.charAt(2))){num++;}else null;}else null;return num;},GetTempFileName:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},GetTempPath:function(){throw $CreateException(new System.NotSupportedException.ctor(),new Error());},HasExtension:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars +(path);var length=path.length;while(--length>=0){var ch=path.charAt(length);if(ch=="."){return (length!=(path.length-1));}else null;if(((ch==System.IO.Path.DirectorySeparatorChar)||(ch==System.IO.Path.AltDirectorySeparatorChar))||(ch==System.IO.Path.VolumeSeparatorChar)){break;}else null;}}else null;return false;},InternalCombine:function(path1,path2){if((path1==null)||(path2==null)){throw $CreateException(new System.ArgumentNullException.ctor$$String((path1==null)?"path1":"path2"),new Error());}else null;System.IO.Path.CheckInvalidPathChars(path1);System.IO.Path.CheckInvalidPathChars(path2);if(path2.length==0){throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Argument_PathEmpty"),"path2"),new Error());}else null;if(System.IO.Path.IsPathRooted(path2)){throw $CreateException(new System.ArgumentException.ctor$$String$$String(System.Environment.GetResourceString("Arg_Path2IsRooted"),"path2"),new Error());}else null;var length=path1.length;if(length==0){return path2;}else null;var ch=path1.charAt(length-1);if(((ch!=System.IO.Path.DirectorySeparatorChar)&&(ch!=System.IO.Path.AltDirectorySeparatorChar))&&(ch!=System.IO.Path.VolumeSeparatorChar)){return (path1+System.IO.Path.DirectorySeparatorChar+path2);}else null;return (path1+path2);},IsDirectorySeparator:function(c){if(c!=System.IO.Path.DirectorySeparatorChar){return (c==System.IO.Path.AltDirectorySeparatorChar);}else null;return true;},IsPathRooted:function(path){if(path!=null){System.IO.Path.CheckInvalidPathChars(path);var length=path.length;if(((length>=1)&&((path.charAt(0)==System.IO.Path.DirectorySeparatorChar)||(path.charAt(0)==System.IO.Path.AltDirectorySeparatorChar)))||((length>=2)&&(path.charAt(1)==System.IO.Path.VolumeSeparatorChar))){return true;}else null;}else null;return false;},NormalizePath:function(path,fullCheck){return System.IO.Path.NormalizePathSlow(path,fullCheck);},NormalizePathSlow:function(path,fullCheck){return path;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$IO$Path); +if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Linq$Enumerable={fullname:"System.Linq.Enumerable",baseTypeName:"System.Object",staticDefinition:{CombinePredicates$1:function(TSource,predicate1,predicate2){return function(x){return predicate1(x)&&predicate2(x);};},CombineSelectors$3:function(TSource,TMiddle,TResult,selector1,selector2){return function(x){return selector2(selector1(x));};},First$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()>0){return list.get_Item$$Int32(0);}else null;}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return enumerator.get_Current();}else null;}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},First$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var $it5=source.GetEnumerator();while($it5.MoveNext()){var local=$it5.get_Current();if(predicate(local)){return local;}else null;}throw $CreateException(System.Linq.Error.NoMatch(),new Error());},FirstOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()>0){return list.get_Item$$Int32(0);}else null;}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return enumerator.get_Current();}else null;}finally{enumerator.Dispose();}}return Default(TSource);},FirstOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var $it6=source.GetEnumerator();while($it6.MoveNext()){var local=$it6.get_Current();if(predicate(local)){return local;}else null;}return Default(TSource);},Single$1$$IEnumerable$1:function(TSource,source){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()==1)return list.get_Item$$Int32(0);else throw $CreateException(new System.InvalidOperationException.ctor(),new Error());}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext())return enumerator.get_Current();else null;}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},Single$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());else null;if(predicate==null)throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());else null;var $it7=source.GetEnumerator();while($it7.MoveNext()){var local=$it7.get_Current();if(predicate(local))return local;else null;}throw $CreateException(System.Linq.Error.NoMatch(),new Error());},SingleOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){if(list.get_Count()==1)return list.get_Item$$Int32(0);else throw $CreateException(new System.InvalidOperationException.ctor(),new Error());}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext())return enumerator.get_Current();else null;}finally{enumerator.Dispose();}}return Default(TSource);},SingleOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());else null;if(predicate==null)throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());else null;var $it8=source.GetEnumerator();while($it8.MoveNext()){var local=$it8.get_Current();if(predicate(local))return local;else null;}return Default(TSource);},Last$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){var count=list.get_Count();if(count>0){return list.get_Item$$Int32(count-1);}else null;}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){var current=null;do{current=enumerator.get_Current();}while(enumerator.MoveNext())return current;}else null;}finally{enumerator.Dispose();}}throw $CreateException(System.Linq.Error.NoElements(),new Error());},Last$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var local=Default(TSource);var flag=false;var $it9=source.GetEnumerator();while($it9.MoveNext()){var local2=$it9.get_Current();if(predicate(local2)){local=local2;flag=true;}else null;}if(!flag){throw $CreateException(System.Linq.Error.NoMatch(),new Error());}else null;return local;},LastOrDefault$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var list=As(source,System.Collections.Generic.IList$1.ctor);if(list!=null){var count=list.get_Count();if(count>0){return list.get_Item$$Int32(count-1);}else null;}else {var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){var current=null;do{current=enumerator.get_Current();}while(enumerator.MoveNext())return current;}else null;}finally{enumerator.Dispose();}}return Default(TSource);},LastOrDefault$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var local=Default(TSource);var $it10=source.GetEnumerator();while($it10.MoveNext()){var local2=$it10.get_Current();if(predicate(local2)){local=local2;}else null;}return local;},Where$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;if(Is(source,System.Linq.Enumerable.Iterator.ctor)){return (Cast(source,System.Linq.Enumerable.Iterator.ctor)).Where(predicate);}else null;if(source instanceof +Array){return new System.Linq.Enumerable.WhereArrayIterator.ctor(TSource,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),predicate);}else null;if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.WhereListIterator.ctor(TSource,Cast(source,System.Collections.Generic.List$1.ctor),predicate);}else null;return new System.Linq.Enumerable.WhereEnumerableIterator.ctor(TSource,source,predicate);},Where$1$$IEnumerable$1$$Func$3:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Contains$1$$IEnumerable$1$$TSource:function(TSource,source,value){if(source==null)throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());else null;var is2=As(source,System.Collections.Generic.ICollection$1.ctor);if(is2!=null)return is2.Contains(value);else null;var $it11=source.GetEnumerator();while($it11.MoveNext()){var local=$it11.get_Current();if(local==value)return true;else null;}return false;},Contains$1$$IEnumerable$1$$TSource$$IEqualityComparer$1:function(TSource,source,value,comparer){if(comparer==null){return System.Linq.Enumerable.Contains$1$$IEnumerable$1$$TSource(TSource,source,value);}else null;if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var $it12=source.GetEnumerator();while($it12.MoveNext()){var local=$it12.get_Current();if(comparer.Equals$$T$$T(local,value)){return true;}else null;}return false;},Any$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var enumerator=source.GetEnumerator();try{if(enumerator.MoveNext()){return true;}else null;}finally{enumerator.Dispose();}return false;},Any$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var $it13=source.GetEnumerator();while($it13.MoveNext()){var local=$it13.get_Current();if(predicate(local)){return true;}else null;}return false;},Concat$1:function(TSource,first,second){if(first==null){throw $CreateException(System.Linq.Error.ArgumentNull("first"),new Error());}else null;if(second==null){throw $CreateException(System.Linq.Error.ArgumentNull("second"),new Error());}else null;return new SharpKit.JavaScript.Private.Enumerable.ConcatEnumerable$1.ctor(TSource,first,second);},Count$1$$IEnumerable$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var is2=As(source,System.Collections.Generic.ICollection$1.ctor);if(is2!=null){return is2.get_Count();}else null;var num=0;var enumerator=source.GetEnumerator();try{while(enumerator.MoveNext()){num++;}}finally{enumerator.Dispose();}return num;},Count$1$$IEnumerable$1$$Func$2:function(TSource,source,predicate){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(predicate==null){throw $CreateException(System.Linq.Error.ArgumentNull("predicate"),new Error());}else null;var num=0;var $it14=source.GetEnumerator();while($it14.MoveNext()){var local=$it14.get_Current();if(predicate(local)){num++;}else null;}return num;},OfType$1:function(TResult,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return new System.Linq.Enumerable.OfTypeIterator.ctor(TResult,source);},OrderBy$2$$IEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,null,false);},OrderBy$2$$IEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,comparer,false);},OrderByDescending$2$$IEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,null,true);},OrderByDescending$2$$IEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){return new System.Linq._OrderedEnumerable$2.ctor(TSource,TKey,source,keySelector,comparer,true);},ThenBy$2$$IOrderedEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return source.CreateOrderedEnumerable$1(TKey,keySelector,null,false);},ThenBy$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return source.CreateOrderedEnumerable$1(TKey,keySelector,comparer,false);},ThenByDescending$2$$IOrderedEnumerable$1$$Func$2:function(TSource,TKey,source,keySelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return source.CreateOrderedEnumerable$1(TKey,keySelector,null,true);},ThenByDescending$2$$IOrderedEnumerable$1$$Func$2$$IComparer$1:function(TSource,TKey,source,keySelector,comparer){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return source.CreateOrderedEnumerable$1(TKey,keySelector,comparer,true);},Select$2$$IEnumerable$1$$Func$2:function(TSource,TResult,source,selector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(selector==null){throw $CreateException(System.Linq.Error.ArgumentNull("selector"),new Error());}else null;if(Is(source,System.Linq.Enumerable.Iterator.ctor)){return (Cast(source,System.Linq.Enumerable.Iterator.ctor)).Select$1(TResult,selector);}else null;if(source instanceof Array){return new System.Linq.Enumerable.WhereSelectArrayIterator.ctor(TSource,TResult,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),null,selector);}else null;if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.WhereSelectListIterator.ctor(TSource,TResult,Cast(source,System.Collections.Generic.List$1.ctor),null,selector);}else null;return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(TSource,TResult,source,null,selector);},Select$2$$IEnumerable$1$$Func$3:function(TSource,TResult,source,selector){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},SelectMany$2$$IEnumerable$1$$Func$2:function(TSource,TResult,source,selector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source") +,new Error());}else null;if(selector==null){throw $CreateException(System.Linq.Error.ArgumentNull("selector"),new Error());}else null;if(source instanceof Array){return new System.Linq.Enumerable.SelectManyArrayIterator.ctor(TSource,TResult,source instanceof Array||source==null?source:(function(){throw new Error("InvalidCastException");}()),selector);}else null;if(Is(source,System.Collections.Generic.List$1.ctor)){return new System.Linq.Enumerable.SelectManyListIterator.ctor(TSource,TResult,Cast(source,System.Collections.Generic.List$1.ctor),selector);}else null;return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(TSource,TResult,source,selector);},SelectMany$2$$IEnumerable$1$$Func$3:function(TSource,TResult,source,selector){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},SelectMany$3$$IEnumerable$1$$Func$2$$Func$3:function(TSource,TCollection,TResult,source,collectionSelector,resultSelector){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;if(collectionSelector==null){throw $CreateException(System.Linq.Error.ArgumentNull("collectionSelector"),new Error());}else null;if(resultSelector==null){throw $CreateException(System.Linq.Error.ArgumentNull("resultSelector"),new Error());}else null;return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(System.Tuple$2.ctor,TResult,System.Linq.Enumerable.SelectMany$2$$IEnumerable$1$$Func$2(TSource,System.Tuple$2.ctor,source,function(t){return System.Linq.Enumerable.Select$2$$IEnumerable$1$$Func$2(TCollection,System.Tuple$2.ctor,collectionSelector(t),function(x){return System.Tuple.Create$2$$T1$$T2(TSource,TCollection,t,x);});}),function(pair){return resultSelector(pair.get_Item1(),pair.get_Item2());});},Skip$1:function(TSource,source,count){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var x=new System.Linq.Enumerable.SkipIterator.ctor(TSource,source,count);return x;},Take$1:function(TSource,source,count){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var x=new System.Linq.Enumerable.TakeIterator.ctor(TSource,source,count);return x;},ToArray$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;var arr= [];var $it15=source.GetEnumerator();while($it15.MoveNext()){var obj=$it15.get_Current();arr.push(obj);}return arr;},ToList$1:function(TSource,source){if(source==null){throw $CreateException(System.Linq.Error.ArgumentNull("source"),new Error());}else null;return new System.Collections.Generic.List$1.ctor$$IEnumerable$1(TSource,source);}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$Enumerable);var System$Linq$_Error={fullname:"System.Linq._Error",baseTypeName:"System.Object",staticDefinition:{ArgumentArrayHasTooManyElements:function(p0){return new System.ArgumentException.ctor$$String("ArgumentArrayHasTooManyElements(p0");},ArgumentNotIEnumerableGeneric:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotIEnumerableGeneric(p0");},ArgumentNotSequence:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotSequence(p0");},ArgumentNotValid:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotValid(p0");},IncompatibleElementTypes:function(){return new System.ArgumentException.ctor$$String("IncompatibleElementTypes");},ArgumentNotLambda:function(p0){return new System.ArgumentException.ctor$$String("ArgumentNotLambda(p0");},MoreThanOneElement:function(){return new System.InvalidOperationException.ctor$$String("MoreThanOneElement");},MoreThanOneMatch:function(){return new System.InvalidOperationException.ctor$$String("MoreThanOneMatch");},NoArgumentMatchingMethodsInQueryable:function(p0){return new System.InvalidOperationException.ctor$$String("NoArgumentMatchingMethodsInQueryable(p0");},NoElements:function(){return new System.InvalidOperationException.ctor$$String("NoElements");},NoMatch:function(){return new System.InvalidOperationException.ctor$$String("NoMatch");},NoMethodOnType:function(p0,p1){return new System.InvalidOperationException.ctor$$String("NoMethodOnType(p0, p1");},NoMethodOnTypeMatchingArguments:function(p0,p1){return new System.InvalidOperationException.ctor$$String("NoMethodOnTypeMatchingArguments(p0, p1");},NoNameMatchingMethodsInQueryable:function(p0){return new System.InvalidOperationException.ctor$$String("NoNameMatchingMethodsInQueryable(p0");},ArgumentNull:function(paramName){return new System.ArgumentNullException.ctor$$String(paramName);},ArgumentOutOfRange:function(paramName){return new System.ArgumentOutOfRangeException.ctor$$String(paramName);},NotImplemented:function(){return new System.NotImplementedException.ctor();},NotSupported:function(){return new System.NotSupportedException.ctor();}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$_Error);var System$Linq$IGrouping$2={fullname:"System.Linq.IGrouping$2",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Interface"};JsTypes.push(System$Linq$IGrouping$2);var System$Linq$IOrderedEnumerable$1={fullname:"System.Linq.IOrderedEnumerable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Interface"};JsTypes.push(System$Linq$IOrderedEnumerable$1);var System$Linq$Error={fullname:"System.Linq.Error",baseTypeName:"System.Object",staticDefinition:{ArgumentNull:function(p){return new System.Exception.ctor$$String("ArgumentNull "+p);},NoElements:function(){return new System.Exception.ctor$$String("NoElements");},NoMatch:function(){return new System.Exception.ctor$$String("NoMatch");}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Linq$Error);var System$Linq$_OrderedEnumerable$1={fullname:"System.Linq._OrderedEnumerable$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Linq.IOrderedEnumerable$1","System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable"],Kind:"Class",definition:{ctor:function(TElement){this.TElement=TElement;this.source=null;this.sorted=null;System.Object.ctor.call(this);},GetEnumerator:function(){if(this.sorted==null)this.sorted=this.SortSource();else null;return this.sorted.GetEnumerator();},SortSource:function(){var list=System.Linq.Enumerable.ToArray$1(this.TElement,this.source);list.sort($CreateDelegate(this,this.Compare));return list;},CreateOrderedEnumerable$1:function(TKey,keySelector,comparer,descending){return (function(){var $v1=new System.Linq._OrderedEnumerable$2.ctor(this.TElement +,TKey,this.source,keySelector,comparer,descending);$v1.parent=this;return $v1;}).call(this);}}};JsTypes.push(System$Linq$_OrderedEnumerable$1);var System$Linq$_OrderedEnumerable$2={fullname:"System.Linq._OrderedEnumerable$2",baseTypeName:"System.Linq._OrderedEnumerable$1",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TElement,TKey,source,keySelector,comparer,descending){this.TElement=TElement;this.TKey=TKey;this.parent=null;this.keySelector=null;this.comparer=null;this.descending=false;System.Linq._OrderedEnumerable$1.ctor.call(this,this.TElement);if(source==null){throw $CreateException(System.Linq._Error.ArgumentNull("source"),new Error());}else null;if(keySelector==null){throw $CreateException(System.Linq._Error.ArgumentNull("keySelector"),new Error());}else null;this.source=source;this.keySelector=keySelector;this.comparer=((comparer!=null)?comparer:System.Collections.Generic.Comparer$1.get_Default());this.descending=descending;},Compare:function(x,y){if(this.parent!=null){var z=this.parent.Compare(x,y);if(z!=0)return z;else null;}else null;var xx=this.keySelector(x);var yy=this.keySelector(y);var zz=this.comparer.Compare(xx,yy);if(this.descending)zz*=-1;else null;return zz;}}};JsTypes.push(System$Linq$_OrderedEnumerable$2);var System$Linq$Enumerable$Iterator={fullname:"System.Linq.Enumerable.Iterator",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerable$1","System.Collections.IEnumerable","System.Collections.Generic.IEnumerator$1","System.IDisposable","System.Collections.IEnumerator"],Kind:"Class",definition:{ctor:function(TSource){this.TSource=TSource;this.state=0;this.current=null;System.Object.ctor.call(this);},Current$$:"`0",get_Current:function(){return this.current;},Dispose:function(){this.current=Default(this.TSource);this.state=-1;},GetEnumerator:function(){if(this.state==0){this.state=1;return this;}else null;var iterator=this.Clone();iterator.state=1;return iterator;}}};JsTypes.push(System$Linq$Enumerable$Iterator);var System$Linq$Enumerable$SelectManyEnumerableIterator={fullname:"System.Linq.Enumerable.SelectManyEnumerableIterator",baseTypeName:"System.Linq.Enumerable.Iterator",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TSource,TResult,source,selector){this.TSource=TSource;this.TResult=TResult;this.source=null;this.selector=null;this.enumerator=null;this.innerEnumerator=null;System.Linq.Enumerable.Iterator.ctor.call(this,this.TResult);this.source=source;this.selector=selector;},Clone:function(){return new System.Linq.Enumerable.SelectManyEnumerableIterator.ctor(this.TSource,this.TResult,this.source,this.selector);},Dispose:function(){if(this.enumerator!=null){this.enumerator.Dispose();}else null;this.enumerator=null;System.Linq.Enumerable.Iterator.commonPrototype.Dispose.call(this);},MoveNext:function(){switch(this.state){case 1:this.enumerator=this.source.GetEnumerator();this.state=2;break;case 2:break;default:return false;}while(true){if(this.innerEnumerator==null){if(this.enumerator.MoveNext()){this.innerEnumerator=this.selector(this.enumerator.get_Current()).GetEnumerator();}else {this.Dispose();return false;}}else {if(this.innerEnumerator.MoveNext()){this.current=this.innerEnumerator.get_Current();return true;}else null;this.innerEnumerator=null;}}},Select$1:function(TResult2,selector){return new System.Linq.Enumerable.WhereSelectEnumerableIterator.ctor(this.TResult,TResult2,this,null,selector);},Where:function(predicate){return new System.Linq.Enumerable.WhereEnumerableIterator.ctor(this.TResult,this,predicate);}}};JsTypes.push(System$Linq$Enumerable$SelectManyEnumerableIterator);var System$Linq$Enumerable$SelectManyListIterator={fullname:"System.Linq.Enumerable.SelectManyListIterator",baseTypeName:"System.Linq.Enumerable.Iterator",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(TSource,TResult,source,selector){this.TSource=TSource;this.TResult=TResult;this.source=null;this.selector=null;this.index=0;this.innerEnumerator=null;System.Linq.Enumerable.Iterator.ctor.call(this,this.TResult);this.source=source;this.selector=selector;},Clone:function(){return new System.Linq.Enumerable.SelectManyListIterator.ctor(this.TSource,this.TResult,this.source,this.selector);},MoveNext:function(){if(this.state==1){while(this.index=this._list.length||index<0)throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"),new Error());else null;return this._list[index];},set_Item$$Int32:function(index,value){if(index>=this._list.length||index<0)throw $CreateException(new System.ArgumentOutOfRangeException.ctor$$String("index"),new Error());else null;this._list[index]=value;},Count$$:"System.Int32",get_Count:function(){return this._list.length;},GetEnumerator:function(){return new System.Collections.IListEnumerator$1.ctor(this.T,this);},ToArray:function(){var len=this.get_Count();var array=new Array(len);for(var i=0;i1)throw $CreateException(new System.InvalidOperationException.ctor$$String("Cannot modify the collection while reentrancy is blocked."),new Error());else null;},ClearItems:function(){this.CheckReentrancy();System.Collections.ObjectModel.Collection$1.commonPrototype.ClearItems.call(this);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction(4));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},InsertItem:function(index,item){this.CheckReentrancy();System.Collections.ObjectModel.Collection$1.commonPrototype.InsertItem.call(this,index,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32(0,item,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs +.ctor("Item[]"));},Move:function(oldIndex,newIndex){this.MoveItem(oldIndex,newIndex);},MoveItem:function(oldIndex,newIndex){this.CheckReentrancy();var item=this.get_Items().get_Item$$Int32(oldIndex);System.Collections.ObjectModel.Collection$1.commonPrototype.RemoveItem.call(this,oldIndex);System.Collections.ObjectModel.Collection$1.commonPrototype.InsertItem.call(this,newIndex,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32$$Int32(3,item,newIndex,oldIndex));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},OnCollectionChanged:function(e){var eh=this.CollectionChanged;if(eh!=null){var $r1=this.BlockReentrancy();try{eh(this,e);}finally{$r1.Dispose();}}else null;},OnPropertyChanged:function(e){var eh=this.PropertyChanged;if(eh!=null)eh(this,e);else null;},RemoveItem:function(index){this.CheckReentrancy();var item=this.get_Items().get_Item$$Int32(index);System.Collections.ObjectModel.Collection$1.commonPrototype.RemoveItem.call(this,index);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Int32(1,item,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Count"));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));},SetItem:function(index,item){this.CheckReentrancy();var oldItem=this.get_Items().get_Item$$Int32(index);System.Collections.ObjectModel.Collection$1.commonPrototype.SetItem.call(this,index,item);this.OnCollectionChanged(new System.Collections.Specialized.NotifyCollectionChangedEventArgs.ctor$$NotifyCollectionChangedAction$$Object$$Object$$Int32(2,item,oldItem,index));this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs.ctor("Item[]"));}}};JsTypes.push(System$Collections$ObjectModel$ObservableCollection$1);var System$Collections$ObjectModel$ReadOnlyCollection$1={fullname:"System.Collections.ObjectModel.ReadOnlyCollection$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.ICollection$1","System.Collections.Generic.IList$1","System.Collections.Generic.IEnumerable$1","System.Collections.ICollection","System.Collections.IEnumerable","System.Collections.IList"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.list=null;System.Object.ctor.call(this);if(list==null)throw $CreateException(new System.ArgumentNullException.ctor$$String("list"),new Error());else null;this.list=list;},Contains:function(value){return this.list.Contains(value);},CopyTo:function(array,index){this.list.CopyTo(array,index);},GetEnumerator:function(){return this.list.GetEnumerator();},IndexOf:function(value){return this.list.IndexOf(value);},Count$$:"System.Int32",get_Count:function(){return this.list.get_Count();},Items$$:"System.Collections.Generic.IList`1[[`0]]",get_Items:function(){return this.list;},Item$$:"`0",get_Item$$Int32:function(index){return this.list.get_Item$$Int32(index);}}};JsTypes.push(System$Collections$ObjectModel$ReadOnlyCollection$1);var System$Collections$ObjectModel$ReadOnlyObservableCollection$1={fullname:"System.Collections.ObjectModel.ReadOnlyObservableCollection$1",baseTypeName:"System.Collections.ObjectModel.ReadOnlyCollection$1",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Specialized.INotifyCollectionChanged","System.ComponentModel.INotifyPropertyChanged"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.CollectionChanged=null;this.PropertyChanged=null;this.CollectionChanged=null;this.PropertyChanged=null;System.Collections.ObjectModel.ReadOnlyCollection$1.ctor.call(this,this.T,list);(list).add_PropertyChanged($CreateDelegate(this,this.SourceCollection_PropertyChanged));(list).add_CollectionChanged($CreateDelegate(this,this.SourceCollection_CollectionChanged));},add_CollectionChanged:function(value){this.CollectionChanged=$CombineDelegates(this.CollectionChanged,value);},remove_CollectionChanged:function(value){this.CollectionChanged=$RemoveDelegate(this.CollectionChanged,value);},add_PropertyChanged:function(value){this.PropertyChanged=$CombineDelegates(this.PropertyChanged,value);},remove_PropertyChanged:function(value){this.PropertyChanged=$RemoveDelegate(this.PropertyChanged,value);},OnCollectionChanged:function(args){var eh=this.CollectionChanged;if(eh!=null)eh(this,args);else null;},OnPropertyChanged:function(args){var eh=this.PropertyChanged;if(eh!=null)eh(this,args);else null;},SourceCollection_CollectionChanged:function(sender,e){this.OnCollectionChanged(e);},SourceCollection_PropertyChanged:function(sender,e){this.OnPropertyChanged(e);}}};JsTypes.push(System$Collections$ObjectModel$ReadOnlyObservableCollection$1);var System$Collections$IListEnumerator$1={fullname:"System.Collections.IListEnumerator$1",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",interfaceNames:["System.Collections.Generic.IEnumerator$1"],Kind:"Class",definition:{ctor:function(T,list){this.T=T;this.List=null;this.Index=0;this.ListCount=0;System.Object.ctor.call(this);this.List=list;this.Index=-1;this.ListCount=list.get_Count();},Current$$:"`0",get_Current:function(){return this.List.get_Item$$Int32(this.Index);},Dispose:function(){this.List=null;},MoveNext:function(){this.Index++;return this.Index0;}}};JsTypes.push(System$Collections$ObjectModel$ObservableCollection$1$Reentrant); +if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Reflection$BindingFlags={fullname:"System.Reflection.BindingFlags",staticDefinition:{CreateInstance:512,DeclaredOnly:2,Default:0,ExactBinding:65536,FlattenHierarchy:64,GetField:1024,GetProperty:4096,IgnoreCase:1,IgnoreReturn:16777216,Instance:4,InvokeMethod:256,NonPublic:32,OptionalParamBinding:262144,Public:16,PutDispProperty:16384,PutRefDispProperty:32768,SetField:2048,SetProperty:8192,Static:8,SuppressChangeType:131072},Kind:"Enum"};JsTypes.push(System$Reflection$BindingFlags);var System$Reflection$MemberInfo={fullname:"System.Reflection.MemberInfo",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this._Name=null;this._DeclaringType=null;this._CustomAttributes=null;System.Object.ctor.call(this);},Name$$:"System.String",get_Name:function(){return this._Name;},DeclaringType$$:"SharpKit.JavaScript.Private.JsImplType",get_DeclaringType:function(){return this._DeclaringType;},VerifyCustomAttributes:function(){this.get_DeclaringType().VerifyCustomAttributesOnTypeAndMembers();},GetBaseMember:function(){return null;},AddCustomAttributes:function(list,attributeType,inherit){this.VerifyCustomAttributes();if(this._CustomAttributes!=null){for(var i=0;i0.0)return 1;if(value==0.0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Double:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int16:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int32:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int64:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$SByte:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Single:function(value){if(value<0)return -1;if(value>0)return 1;if(value==0)return 0;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sin:function(a){return Math.sin(a);},Sinh:function(value){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Sqrt:function(d){return Math.sqrt(d);},Tan:function(a){return Math.tan(a);},Tanh:function(value){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Truncate$$Decimal:function(d){return d|0;},Truncate$$Double:function(d){return d|0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Math); -if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Text$StringBuilder={fullname:"System.Text.StringBuilder",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=new Array(0);this.length=0;},ctor$$Int32:function(len){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=new Array(0);this.length=0;},ctor$$String:function(s){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=[s];this.length=s==null?0:s.length;},Append$$Char:function(s){this.array.push(s);this.length+=1;},Append$$String:function(s){this.array.push(s);this.length+=s.length;},AppendFormat$$String$$Object:function(s,arg0){var ss=System.String.Format$$String$$Object(s,arg0);this.array.push(ss);this.length+=ss.length;},AppendFormat$$String$$Object$$Object:function(s,arg0,arg1){var ss=System.String.Format$$String$$Object$$Object(s,arg0,arg1);this.array.push(ss);this.length+=ss.length;},AppendFormat$$String$$Object$$Object$$Object:function(s,arg0,arg1,arg2){var ss=System.String.Format$$String$$Object$$Object$$Object(s,arg0,arg1,arg2);this.array.push(ss);this.length+=ss.length;},Append$$Object:function(obj){if(obj!=null){var s=obj.toString();this.array.push(s);this.length+=s.length;}},Insert$$Int32$$Boolean:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.IndexOutOfRangeException.ctor(),new Error());this.array.insert(index,value.toString());return this;},Insert$$Int32$$Byte:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Char:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Char$Array:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Decimal:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Double:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Int16:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Int32:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Int64:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Object:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$SByte:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$Single:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$String:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$UInt16:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$UInt32:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$UInt64:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());this.array.insert(index,value);return this;},Insert$$Int32$$String$$Int32:function(index,value,count){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());for(var i=0;ithis.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());for(var i=0;ithis.length)this.Append$$String(new Array(value+1).join("\0"));else {this.Remove(value,this.length-value);}},Remove:function(start,count){var s=this.array.join("");s=s.Remove$$Int32$$Int32(start,count);this.array=[s];this.length=s.length;return this;}}};JsTypes.push(System$Text$StringBuilder); -if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Runtime$Serialization$IExtensibleDataObject={fullname:"System.Runtime.Serialization.IExtensibleDataObject",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$Runtime$Serialization$IExtensibleDataObject);var System$Runtime$Serialization$ISerializable={fullname:"System.Runtime.Serialization.ISerializable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$Runtime$Serialization$ISerializable);var SharpKit$PropertyInfoExtensions={fullname:"SharpKit.PropertyInfoExtensions",baseTypeName:"System.Object",staticDefinition:{IsStatic:function(pi){return pi._IsStatic;},IsPublic:function(pi){throw new Error('Not Implemented');}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$PropertyInfoExtensions);var SharpKit$Extensions2={fullname:"SharpKit.Extensions2",baseTypeName:"System.Object",staticDefinition:{GetValueOrDefaultIfNullOrEmpty:function(s,defaultValue){if(s==null || s.length==0) return defaultValue; return s;},IsNullOrEmpty$$String:function(s){return s==null||s.length==0;},IsNotNullOrEmpty$$String:function(s){return s!=null&&s.length>0;},HtmlEscape:function(s){return s.Replace$$String$$String("&","&").Replace$$String$$String("<","<").Replace$$String$$String(">",">").Replace$$String$$String("\n","
");},ReplaceFirst$$String$$String$$String:function(s,search,replace){return s.ReplaceFirst(search, replace);},ReplaceFirst$$String$$String$$String$$StringComparison:function(s,search,replace,comparisonType){var index=s.indexOf(search,comparisonType);if(index!=-1){var finalStr=System.String.Concat$$String$$String$$String(s.substr(0,index),replace,s.substr(search.length+index));return finalStr;}return s;},FixCamelCasing:function(s){var sb=new System.Text.StringBuilder.ctor();var first=true;var $it19=s.GetEnumerator();while($it19.MoveNext()){var c=$it19.get_Current();if(System.Char.IsUpper$$Char(c)&&!first){sb.Append$$Char(" ");}sb.Append$$Char(c);first=false;}return sb.toString();},RemoveLast:function(s,count){return s.substr(s, s.length-count);},TrimEnd:function(s,trimText){if(s.EndsWith$$String(trimText))return SharpKit.Extensions2.RemoveLast(s,trimText.length);return s;},EqualsIgnoreCase:function(s1,s2){return System.String.Compare$$String$$String$$Boolean(s1,s2,true)==0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$Extensions2);var SharpKit$JavaScript$Utils$Js={fullname:"SharpKit.JavaScript.Utils.Js",baseTypeName:"System.Object",staticDefinition:{cctor:function(){SharpKit.JavaScript.Utils.Js.undefined=null;},escape:function(s){return escape(s);},JsEquals:function(obj,value){return obj==value;},JsExactEqualsToUndefined:function(obj){return obj===undefined;},JsExactEquals:function(obj,value){return obj===value;},Typeof:function(obj){return typeof(obj);},ApplyFunction:function(func,thisArg,prms){throw $CreateException(new System.NotImplementedException.ctor$$String("TODO: Implement"),new Error());},CallFunction:function(func,thisArg,prms){throw $CreateException(new System.NotImplementedException.ctor$$String("TODO: Implement"),new Error());},CallFunction2:function(obj,funcName,prms){return obj[funcName].apply(obj, Arguments.from(arguments, 2));},FindOverloadedMethodName:function(obj,funcName){funcName+='$$';for(var o in obj) +return this._MakeGenericType(x);},GetGenericTypeDefinition:function(){return this._GenericTypeDefinition;},GetGenericArguments:function(){if(this._TypeArguments==null)return System.Type.EmptyTypes;else null;return this._TypeArguments;},_MakeGenericType:function(typeArguments){if(this._MakeGenericTypeCache==null)this._MakeGenericTypeCache=new Object();else null;var key="";for(var i=0;i0.0)return 1;else null;if(value==0.0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Double:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int16:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int32:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Int64:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$SByte:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sign$$Single:function(value){if(value<0)return -1;else null;if(value>0)return 1;else null;if(value==0)return 0;else null;throw $CreateException(new System.ArgumentException.ctor$$String("value"),new Error());},Sin:function(a){return Math.sin(a);},Sinh:function(value){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Sqrt:function(d){return Math.sqrt(d);},Tan:function(a){return Math.tan(a);},Tanh:function(value){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},Truncate$$Decimal:function(d){return d|0;},Truncate$$Double:function(d){return d|0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(System$Math); +if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Text$StringBuilder={fullname:"System.Text.StringBuilder",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=new Array(0);this.length=0;},ctor$$Int32:function(len){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=new Array(0);this.length=0;},ctor$$String:function(s){this.array=null;this.length=0;System.Object.ctor.call(this);this.array=[s];this.length=s==null?0:s.length;},Append$$Char:function(s){this.array.push(s);this.length+=1;},Append$$String:function(s){this.array.push(s);this.length+=s.length;},AppendFormat$$String$$Object:function(s,arg0){var ss=System.String.Format$$String$$Object(s,arg0);this.array.push(ss);this.length+=ss.length;},AppendFormat$$String$$Object$$Object:function(s,arg0,arg1){var ss=System.String.Format$$String$$Object$$Object(s,arg0,arg1);this.array.push(ss);this.length+=ss.length;},AppendFormat$$String$$Object$$Object$$Object:function(s,arg0,arg1,arg2){var ss=System.String.Format$$String$$Object$$Object$$Object(s,arg0,arg1,arg2);this.array.push(ss);this.length+=ss.length;},Append$$Object:function(obj){if(obj!=null){var s=obj.toString();this.array.push(s);this.length+=s.length;}else null;},Insert$$Int32$$Boolean:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.IndexOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value.toString());return this;},Insert$$Int32$$Byte:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Char:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Char$Array:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Decimal:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Double:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Int16:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Int32:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Int64:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Object:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$SByte:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$Single:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$String:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$UInt16:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$UInt32:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$UInt64:function(index,value){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;this.array.insert(index,value);return this;},Insert$$Int32$$String$$Int32:function(index,value,count){if(index<0||index>this.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;for(var i=0;ithis.array.length)throw $CreateException(new System.ArgumentOutOfRangeException.ctor(),new Error());else null;for(var i=0;ithis.length)this.Append$$String(new Array(value+1).join("\0"));else {this.Remove(value,this.length-value);}},Remove:function(start,count){var s=this.array.join("");s=s.Remove$$Int32$$Int32(start,count);this.array=[s];this.length=s.length;return this;}}};JsTypes.push(System$Text$StringBuilder); +if(typeof(JsTypes)=="undefined")var JsTypes=[];var System$Runtime$Serialization$IExtensibleDataObject={fullname:"System.Runtime.Serialization.IExtensibleDataObject",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$Runtime$Serialization$IExtensibleDataObject);var System$Runtime$Serialization$ISerializable={fullname:"System.Runtime.Serialization.ISerializable",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Interface"};JsTypes.push(System$Runtime$Serialization$ISerializable);var SharpKit$PropertyInfoExtensions={fullname:"SharpKit.PropertyInfoExtensions",baseTypeName:"System.Object",staticDefinition:{IsStatic:function(pi){return pi._IsStatic;},IsPublic:function(pi){throw new Error('Not Implemented');}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$PropertyInfoExtensions);var SharpKit$Extensions2={fullname:"SharpKit.Extensions2",baseTypeName:"System.Object",staticDefinition:{GetValueOrDefaultIfNullOrEmpty:function(s,defaultValue){if(s==null || s.length==0) return defaultValue; return s;},IsNullOrEmpty$$String:function(s){return s==null||s.length==0;},IsNotNullOrEmpty$$String:function(s){return s!=null&&s.length>0;},HtmlEscape:function(s){return s.Replace$$String$$String("&","&").Replace$$String$$String("<","<").Replace$$String$$String(">",">").Replace$$String$$String("\n","
");},ReplaceFirst$$String$$String$$String:function(s,search,replace){return s.ReplaceFirst(search, replace);},ReplaceFirst$$String$$String$$String$$StringComparison:function(s,search,replace,comparisonType){var index=s.indexOf(search,comparisonType);if(index!=-1){var finalStr=System.String.Concat$$String$$String$$String(s.substr(0,index),replace,s.substr(search.length+index));return finalStr;}else null;return s;},FixCamelCasing:function(s){var sb=new System.Text.StringBuilder.ctor();var first=true;var $it19=s.GetEnumerator();while($it19.MoveNext()){var c=$it19.get_Current();if(System.Char.IsUpper$$Char(c)&&!first){sb.Append$$Char(" ");}else null;sb.Append$$Char(c);first=false;}return sb.toString();},RemoveLast:function(s,count){return s.substr(s, s.length-count);},TrimEnd:function(s,trimText){if(s.EndsWith$$String(trimText))return SharpKit.Extensions2.RemoveLast(s,trimText.length);else null;return s;},EqualsIgnoreCase:function(s1,s2){return System.String.Compare$$String$$String$$Boolean(s1,s2,true)==0;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$Extensions2);var SharpKit$JavaScript$Utils$Js={fullname:"SharpKit.JavaScript.Utils.Js",baseTypeName:"System.Object",staticDefinition:{cctor:function(){SharpKit.JavaScript.Utils.Js.undefined=null;},escape:function(s){return escape(s);},JsEquals:function(obj,value){return obj==value;},JsExactEqualsToUndefined:function(obj){return obj===undefined;},JsExactEquals:function(obj,value){return obj===value;},Typeof:function(obj){return typeof(obj);},ApplyFunction:function(func,thisArg,prms){throw $CreateException(new System.NotImplementedException.ctor$$String("TODO: Implement"),new Error());},CallFunction:function(func,thisArg,prms){throw $CreateException(new System.NotImplementedException.ctor$$String("TODO: Implement"),new Error());},CallFunction2:function(obj,funcName,prms){return obj[funcName].apply(obj, Arguments.from(arguments, 2));},FindOverloadedMethodName:function(obj,funcName){funcName+='$$';for(var o in obj) if (typeof(obj[o])=='function' && o.indexOf(funcName)==0) return o; -return null;},Eval:function(code){eval(code)},Compile:function(){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},GetHashKey:function(key){return JsCompiler.GetHashKey(key);},DeleteMember:function(obj,name){delete obj[name];},parseFloat:function(s){return parseFloat(s);},parseInt:function(s){return parseInt(s);},ApplyNew:function(jsCtor,prms){if(prms==null || prms.length==0) return new jsCtor(); return new jsCtor(prms[0], prms[1], prms[2], prms[3], prms[4], prms[5], prms[6], prms[7], prms[8]);},IsArray:function(obj){return obj instanceof Array;},isNaN:function(obj){return isNaN(obj);},decodeURIComponent:function(encodedURIString){return decodeURIComponent(encodedURIString)},encodeURIComponent:function(encodedURIString){return encodeURIComponent(encodedURIString)},encodeURI:function(URIString){return encodeURI(URIString)},decodeURI:function(URIString){return decodeURI(URIString)},unescape:function(s){return unescape(s)}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$JavaScript$Utils$Js);var SharpKit$JsClr$Utils$JsClrClientSerializer={fullname:"SharpKit.JsClr.Utils.JsClrClientSerializer",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.ObjInfos=null;this.RefIndex=0;this.IgnoreFields=null;System.Object.ctor.call(this);this.ObjInfos=new System.Collections.Generic.Dictionary$2.ctor(System.Object.ctor,"SharpKit.JsClr.Utils.ObjInfo");this.IgnoreFields=new Object();this.IgnoreFields["_type"]=true;this.IgnoreFields["_hashKey"]=true;},Serialize:function(obj){var obj2=this.Serialize2(obj);return JSON.stringify(obj2);},Serialize2:function(obj){if(obj===undefined)return undefined;if(obj===null)return null;var jsType=typeof(obj);if(jsType=="object"){return this.SerializeRefOrContent(obj);}else if(jsType=="function"){return undefined;}else {return obj;}},SerializeRefOrContent:function(obj){if(!this.ObjInfos.ContainsKey(obj)){var info={};this.ObjInfos.Add(obj,info);this.SerializeFirstRef(obj,info);return info.FirstRef;}else {var info=this.ObjInfos.get_Item$$TKey(obj);if(info.Ref==null){this.RefIndex++;info.Ref={$r:this.RefIndex.toString(),$t:"ObjRef"};info.FirstRef.$k=info.Ref.$r;}return info.Ref;}},SerializeFirstRef:function(obj,info){var obj2={};info.FirstRef=obj2;var type=obj.GetType();obj2.$t=type.get_FullName();var obj3=obj;if(Is(obj,System.Collections.IList.ctor)){var list=obj;obj2.$l= [];var $it20=list.GetEnumerator();while($it20.MoveNext()){var item=$it20.get_Current();var item2=this.Serialize2(item);obj2.$l.push(item2);}}else {for(var p in obj3){if(this.IgnoreFields[p])continue;if(!obj3.hasOwnProperty(p))continue;var value=obj3[p];obj2[p]=this.Serialize2(value);}}return obj2;}}};JsTypes.push(SharpKit$JsClr$Utils$JsClrClientSerializer);var SharpKit$JavaScript$JsNamingHelper={fullname:"SharpKit.JavaScript.JsNamingHelper",baseTypeName:"System.Object",staticDefinition:{JsFunctionNameToClrMethodName:function(jsFuncName){var methodName=jsFuncName;var di=jsFuncName.indexOf("$");if(di>0)methodName=jsFuncName.substr(0,di);return methodName;},ClrTypeToJsTypeRef:function(type){var att=System.Linq.Enumerable.FirstOrDefault$1$$IEnumerable$1(SharpKit.JavaScript.JsTypeAttribute.ctor,System.Linq.Enumerable.OfType$1(SharpKit.JavaScript.JsTypeAttribute.ctor,type.GetCustomAttributes$$Type$$Boolean(Typeof(SharpKit.JavaScript.JsTypeAttribute.ctor),false)));if(att!=null&&SharpKit.Extensions2.IsNotNullOrEmpty$$String(att.get_Name())){return att.get_Name().Replace$$Char$$Char("`","$");}return type.get_Namespace()+"."+type.get_Name().Replace$$Char$$Char("`","$");},ClrConstructorToJsFunctionName:function(mi){var sb=new System.Text.StringBuilder.ctor();var typeRef=SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(mi.get_DeclaringType());sb.Append$$String(typeRef);sb.Append$$String(".ctor");SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(),sb);return sb.toString();},ConvertParametersToJsFunctionName:function(prms,sb){for(var $i22=0,$l22=prms.length,prm=prms[$i22];$i22<$l22;$i22++,prm=prms[$i22]){sb.Append$$String("$$");sb.Append$$String(prm.get_ParameterType().get_Name());}},ClrMethodBaseToJsFunctionName:function(mi){if(mi.get_MemberType()==1){return SharpKit.JavaScript.JsNamingHelper.ClrMethodToJsFunctionName(Cast(mi,System.Reflection.MethodInfo.ctor));}else if(mi.get_MemberType()==8){return SharpKit.JavaScript.JsNamingHelper.ClrConstructorToJsFunctionName(Cast(mi,System.Reflection.ConstructorInfo.ctor));}else throw $CreateException(new System.NotImplementedException.ctor(),new Error());},ClrMethodToJsFunctionName:function(mi){if(SharpKit.JavaScript.JsNamingHelper.IsPropertySetter(mi)){return mi.get_Name();}var name=mi.get_Name();var type=mi.get_DeclaringType();if(type.get_IsGenericType()){type=type.GetGenericTypeDefinition();mi=type.GetMethod$$String(name);}var sb=new System.Text.StringBuilder.ctor();if(mi.get_IsStatic()){sb.Append$$String(SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(type));var att=System.Linq.Enumerable.FirstOrDefault$1$$IEnumerable$1(SharpKit.JavaScript.JsTypeAttribute.ctor,System.Linq.Enumerable.OfType$1(SharpKit.JavaScript.JsTypeAttribute.ctor,type.GetCustomAttributes$$Type$$Boolean(Typeof(SharpKit.JavaScript.JsTypeAttribute.ctor),false)));if(att==null||att.get_Mode()==2){sb.Append$$String(".staticDefinition.");}else {sb.Append$$String(".");}}sb.Append$$String(name);SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(),sb);return sb.toString();},IsPropertySetter:function(mi){var name=mi.get_Name();return name.StartsWith$$String("set_")&&mi.GetParameters().length==1;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$JavaScript$JsNamingHelper); +return null;},Eval:function(code){eval(code)},Compile:function(){throw $CreateException(new System.NotImplementedException.ctor(),new Error());},GetHashKey:function(key){return JsCompiler.GetHashKey(key);},DeleteMember:function(obj,name){delete obj[name];},parseFloat:function(s){return parseFloat(s);},parseInt:function(s){return parseInt(s);},ApplyNew:function(jsCtor,prms){if(prms==null || prms.length==0) return new jsCtor(); return new jsCtor(prms[0], prms[1], prms[2], prms[3], prms[4], prms[5], prms[6], prms[7], prms[8]);},IsArray:function(obj){return obj instanceof Array;},isNaN:function(obj){return isNaN(obj);},decodeURIComponent:function(encodedURIString){return decodeURIComponent(encodedURIString)},encodeURIComponent:function(encodedURIString){return encodeURIComponent(encodedURIString)},encodeURI:function(URIString){return encodeURI(URIString)},decodeURI:function(URIString){return decodeURI(URIString)},unescape:function(s){return unescape(s)}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$JavaScript$Utils$Js);var SharpKit$JsClr$Utils$JsClrClientSerializer={fullname:"SharpKit.JsClr.Utils.JsClrClientSerializer",baseTypeName:"System.Object",assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){this.ObjInfos=null;this.RefIndex=0;this.IgnoreFields=null;System.Object.ctor.call(this);this.ObjInfos=new System.Collections.Generic.Dictionary$2.ctor(System.Object.ctor,"SharpKit.JsClr.Utils.ObjInfo");this.IgnoreFields=new Object();this.IgnoreFields["_type"]=true;this.IgnoreFields["_hashKey"]=true;},Serialize:function(obj){var obj2=this.Serialize2(obj);return JSON.stringify(obj2);},Serialize2:function(obj){if(obj===undefined)return undefined;else null;if(obj===null)return null;else null;var jsType=typeof(obj);if(jsType=="object"){return this.SerializeRefOrContent(obj);}else if(jsType=="function"){return undefined;}else {return obj;}},SerializeRefOrContent:function(obj){if(!this.ObjInfos.ContainsKey(obj)){var info={};this.ObjInfos.Add(obj,info);this.SerializeFirstRef(obj,info);return info.FirstRef;}else {var info=this.ObjInfos.get_Item$$TKey(obj);if(info.Ref==null){this.RefIndex++;info.Ref={$r:this.RefIndex.toString(),$t:"ObjRef"};info.FirstRef.$k=info.Ref.$r;}else null;return info.Ref;}},SerializeFirstRef:function(obj,info){var obj2={};info.FirstRef=obj2;var type=obj.GetType();obj2.$t=type.get_FullName();var obj3=obj;if(Is(obj,System.Collections.IList.ctor)){var list=obj;obj2.$l= [];var $it20=list.GetEnumerator();while($it20.MoveNext()){var item=$it20.get_Current();var item2=this.Serialize2(item);obj2.$l.push(item2);}}else {for(var p in obj3){if(this.IgnoreFields[p])continue;else null;if(!obj3.hasOwnProperty(p))continue;else null;var value=obj3[p];obj2[p]=this.Serialize2(value);}}return obj2;}}};JsTypes.push(SharpKit$JsClr$Utils$JsClrClientSerializer);var SharpKit$JavaScript$JsNamingHelper={fullname:"SharpKit.JavaScript.JsNamingHelper",baseTypeName:"System.Object",staticDefinition:{JsFunctionNameToClrMethodName:function(jsFuncName){var methodName=jsFuncName;var di=jsFuncName.indexOf("$");if(di>0)methodName=jsFuncName.substr(0,di);else null;return methodName;},ClrTypeToJsTypeRef:function(type){var att=System.Linq.Enumerable.FirstOrDefault$1$$IEnumerable$1(SharpKit.JavaScript.JsTypeAttribute.ctor,System.Linq.Enumerable.OfType$1(SharpKit.JavaScript.JsTypeAttribute.ctor,type.GetCustomAttributes$$Type$$Boolean(Typeof(SharpKit.JavaScript.JsTypeAttribute.ctor),false)));if(att!=null&&SharpKit.Extensions2.IsNotNullOrEmpty$$String(att.get_Name())){return att.get_Name().Replace$$Char$$Char("`","$");}else null;return type.get_Namespace()+"."+type.get_Name().Replace$$Char$$Char("`","$");},ClrConstructorToJsFunctionName:function(mi){var sb=new System.Text.StringBuilder.ctor();var typeRef=SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(mi.get_DeclaringType());sb.Append$$String(typeRef);sb.Append$$String(".ctor");SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(),sb);return sb.toString();},ConvertParametersToJsFunctionName:function(prms,sb){for(var $i22=0,$l22=prms.length,prm=prms[$i22];$i22<$l22;$i22++,prm=prms[$i22]){sb.Append$$String("$$");sb.Append$$String(prm.get_ParameterType().get_Name());}},ClrMethodBaseToJsFunctionName:function(mi){if(mi.get_MemberType()==1){return SharpKit.JavaScript.JsNamingHelper.ClrMethodToJsFunctionName(Cast(mi,System.Reflection.MethodInfo.ctor));}else if(mi.get_MemberType()==8){return SharpKit.JavaScript.JsNamingHelper.ClrConstructorToJsFunctionName(Cast(mi,System.Reflection.ConstructorInfo.ctor));}else throw $CreateException(new System.NotImplementedException.ctor(),new Error());},ClrMethodToJsFunctionName:function(mi){if(SharpKit.JavaScript.JsNamingHelper.IsPropertySetter(mi)){return mi.get_Name();}else null;var name=mi.get_Name();var type=mi.get_DeclaringType();if(type.get_IsGenericType()){type=type.GetGenericTypeDefinition();mi=type.GetMethod$$String(name);}else null;var sb=new System.Text.StringBuilder.ctor();if(mi.get_IsStatic()){sb.Append$$String(SharpKit.JavaScript.JsNamingHelper.ClrTypeToJsTypeRef(type));var att=System.Linq.Enumerable.FirstOrDefault$1$$IEnumerable$1(SharpKit.JavaScript.JsTypeAttribute.ctor,System.Linq.Enumerable.OfType$1(SharpKit.JavaScript.JsTypeAttribute.ctor,type.GetCustomAttributes$$Type$$Boolean(Typeof(SharpKit.JavaScript.JsTypeAttribute.ctor),false)));if(att==null||att.get_Mode()==2){sb.Append$$String(".staticDefinition.");}else {sb.Append$$String(".");}}else null;sb.Append$$String(name);SharpKit.JavaScript.JsNamingHelper.ConvertParametersToJsFunctionName(mi.GetParameters(),sb);return sb.toString();},IsPropertySetter:function(mi){var name=mi.get_Name();return name.StartsWith$$String("set_")&&mi.GetParameters().length==1;}},assemblyName:"SharpKit.JsClr",Kind:"Class",definition:{ctor:function(){System.Object.ctor.call(this);}}};JsTypes.push(SharpKit$JavaScript$JsNamingHelper); diff --git a/Frameworks/make.cmd b/Frameworks/make.cmd index 479813c..9658cb4 100755 --- a/Frameworks/make.cmd +++ b/Frameworks/make.cmd @@ -1,4 +1,4 @@ @cd /D %~dp0 @call ../scripts/set-variables -%msbuild% Frameworks.sln +%msbuild% Frameworks.sln -verbosity:minimal