-
-
Save fusspawn/231beee4c6ddb90bfca3 to your computer and use it in GitHub Desktop.
Example.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace HelloDuoCode | |
{ | |
static class Program | |
{ | |
static void Run() // HTML body.onload event entry point, see index.html | |
{ | |
System.Console.WriteLine("Hello DuoCode"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// mscorlib, Version=0.6.1253.0, Culture=neutral, PublicKeyToken=null | |
// | |
// Generated by DuoCode Compiler 0.6.1253.0 beta | |
// | |
(function mscorlib() { | |
var $asm = { | |
fullName: "mscorlib", | |
anonymousTypes: [], | |
types: [], | |
$getAttrs: function() { return [new System.Reflection.AssemblyProductAttribute.ctor("DuoCode"), new System.Reflection.AssemblyCompanyAttribute.ctor("DuoCode"), new System.Reflection.AssemblyCopyrightAttribute.ctor("Copyright (c) 2014 - 2015 DuoCode"), new System.Reflection.AssemblyTrademarkAttribute.ctor("DuoCode"), new System.Reflection.AssemblyCultureAttribute.ctor(""), new System.Reflection.AssemblyVersionAttribute.ctor("0.6.1253.0"), new System.Reflection.AssemblyFileVersionAttribute.ctor("0.6.1253.0"), new System.Reflection.AssemblyTitleAttribute.ctor("DuoCode.Runtime"), new System.Reflection.AssemblyDescriptionAttribute.ctor("DuoCode Runtime"), new System.Reflection.AssemblyConfigurationAttribute.ctor(""), new DuoCode.Runtime.CompilerAttribute.ctor("0.6.1253.0 beta")]; } | |
}; | |
if(Memory.netg == undefined) | |
Memory.netg = {}; | |
var $g = Memory.netg; | |
var System = $g.System = $g.System || {}; | |
System.Collections = System.Collections || {}; | |
System.Collections.Generic = System.Collections.Generic || {}; | |
System.Collections.ObjectModel = System.Collections.ObjectModel || {}; | |
System.Diagnostics = System.Diagnostics || {}; | |
System.Drawing = System.Drawing || {}; | |
var DuoCode = $g.DuoCode = $g.DuoCode || {}; | |
DuoCode.Runtime = DuoCode.Runtime || {}; | |
System.Globalization = System.Globalization || {}; | |
System.IO = System.IO || {}; | |
System.Linq = System.Linq || {}; | |
System.Linq.Expressions = System.Linq.Expressions || {}; | |
System.Reflection = System.Reflection || {}; | |
System.Resources = System.Resources || {}; | |
System.Runtime = System.Runtime || {}; | |
System.Runtime.CompilerServices = System.Runtime.CompilerServices || {}; | |
System.Runtime.ExceptionServices = System.Runtime.ExceptionServices || {}; | |
System.Runtime.InteropServices = System.Runtime.InteropServices || {}; | |
System.Runtime.Serialization = System.Runtime.Serialization || {}; | |
System.Text = System.Text || {}; | |
System.Threading = System.Threading || {}; | |
System.Threading.Tasks = System.Threading.Tasks || {}; | |
System.Web = System.Web || {}; | |
var $d = DuoCode.Runtime; | |
$d.$assemblies = { mscorlib: $asm }; | |
$d.declare = function declare(typeName, baseType, typeKind, assembly, typeInitializer, typeArgs, baseTypeArgs, builtinType) { | |
var typeFunction = null; | |
var isGenericType = (typeKind & 256) != 0; | |
var isCctor = true; | |
typeFunction = builtinType || (!isGenericType ? function() { | |
if (this && this.constructor == typeFunction) | |
throw new Error("can't construct instance this way, use 'new " + typeName + ".ctor()' instead"); | |
if (isCctor) { | |
isCctor = false; | |
if (typeFunction.$baseType != null && typeFunction.$baseType.$typeKind != 1) | |
typeFunction.$baseType(); | |
if (typeFunction.cctor != null) | |
typeFunction.cctor.call(typeFunction); | |
} | |
return typeFunction; | |
} : ((typeKind & 255) == 66 ? function() { | |
return $d.genericType(typeFunction, Array.prototype.slice.call(arguments)); | |
} : function() { | |
if (this && this.constructor == typeFunction) | |
throw new Error("can't construct instance this way, use 'new (" + typeName + "(T).ctor)()' instead"); | |
var target = $d.genericType(typeFunction, Array.prototype.slice.call(arguments)); | |
target(); | |
return target; | |
})); | |
if (typeKind == 69) { | |
baseType = System.Object; | |
typeKind = 0; | |
typeName = "AnonymousType" + assembly.anonymousTypes.length; | |
assembly.anonymousTypes.push(typeFunction); | |
} | |
typeFunction.$typeKind = typeKind & ~1024; | |
if (typeArgs != null) { | |
if (isGenericType) | |
typeArgs = typeArgs.map(function(x) { | |
return (typeof x === "string") ? $d.declareTP(x) : x; | |
}); | |
typeFunction.$typeArgs = typeArgs; | |
} | |
if (baseType == null) { | |
if ((typeKind & 32) != 0) | |
baseType = System.ValueType; | |
else | |
if ((typeKind & 255) == 65) | |
baseType = System.MulticastDelegate; | |
} | |
if (builtinType == null) { | |
typeFunction.toString = $d.typeFuncToString; | |
if (baseType != null) { | |
if ((typeKind & 512) != 0) { | |
if (baseTypeArgs != null) { | |
if (isGenericType) | |
typeFunction.$baseTypeArgs = baseTypeArgs; | |
baseTypeArgs = baseTypeArgs.map(function(x) { | |
return (typeof x === "number") ? typeArgs[x] : x; | |
}); | |
} | |
else | |
baseTypeArgs = typeArgs; | |
if (isGenericType) | |
typeFunction.$baseTypeU = baseType; | |
baseType = $d.genericType(baseType, baseTypeArgs); | |
} | |
typeFunction.prototype = Object.create(baseType.prototype); | |
typeFunction.prototype.constructor = typeFunction; | |
} | |
} | |
if (baseType != null && typeKind != 1) | |
typeFunction.$baseType = baseType; | |
if (assembly != null) { | |
if (assembly instanceof Function) { | |
var dt = assembly; | |
typeFunction.$declaringType = dt; | |
assembly = dt.$assembly; | |
typeName = dt.$typeName + "+" + typeName; | |
} | |
typeFunction.$assembly = assembly; | |
if ((typeKind & 1024) == 0) | |
assembly.types.push(typeFunction); | |
} | |
typeFunction.$typeName = typeName; | |
if (typeInitializer != null) { | |
var proto = (typeKind == 279) ? Array.prototype : typeFunction.prototype; | |
if (typeArgs != null) | |
typeInitializer.apply(null, [typeFunction, proto].concat(typeArgs)); | |
else | |
typeInitializer(typeFunction, proto); | |
if (typeKind == 1 || isGenericType) | |
typeFunction.$typeInit = typeInitializer; | |
} | |
return typeFunction; | |
}; | |
$d.declareEnum = function declareEnum(typeName, underlyingType, assembly, typeAttributes, enumNames, enumValues, getEnumAttrs, getTypeAttrs) { | |
var typeFunc = $d.declare(typeName, System.Enum, 63, assembly); | |
typeFunc.cctor = $d.enumCctor; | |
typeFunc.$underlyingType = underlyingType; | |
typeFunc.$enumTypeAttrs = typeAttributes; | |
typeFunc.$enumNames = enumNames; | |
typeFunc.$enumValues = enumValues; | |
if (getEnumAttrs) | |
typeFunc.$getEnumAttrs = getEnumAttrs; | |
if (getTypeAttrs) | |
typeFunc.$getEnumTypeAttrs = getTypeAttrs; | |
typeFunc.$intfs = System.Enum.$intfs; | |
return typeFunc; | |
}; | |
$d.declareTP = function declareTP(name, baseType) { | |
var typeFunc = function() {}; | |
typeFunc.$typeKind = 67; | |
typeFunc.$baseType = baseType || System.Object; | |
typeFunc.$typeName = name; | |
typeFunc.toString = $d.typeFuncToString; | |
return typeFunc; | |
}; | |
$d.enumCctor = function enumCctor() { | |
var t = this; | |
var names = t.$enumNames; | |
var values = t.$enumValues; | |
for (var i = 0; i < names.length; ++i) { | |
t[names[i]] = values[i]; | |
} | |
}; | |
$d.typeFuncToString = function typeFuncToString() { | |
return this.$typeName; | |
}; | |
$d.default = function default_(type) { | |
var tk = type.$typeKind; | |
return (tk == 39) ? false : (tk >= 40 && tk <= 51) ? 0 : (tk == 63 || tk == 61) ? 0 : (tk == 57 || tk == 58 || tk == 62) ? new type.ctor() : null; | |
}; | |
$d.as = function as(obj, dstType) { | |
return (obj != null) && $d.typeIsAssignableFrom(dstType, $d.getTypeFuncFromInst(obj)) ? obj : null; | |
}; | |
$d.is = function is(obj, dstType) { | |
return (obj != null) && $d.typeIsAssignableFrom(dstType, $d.getTypeFuncFromInst(obj)); | |
}; | |
$d.cast = function cast(obj, dstType) { | |
if (obj == null) { | |
if (dstType.$typeKind != 56 && (dstType.$typeKind & 32) != 0) { | |
throw new System.InvalidCastException.ctor("null object can't be converted to a value type"); | |
} | |
return $d.default(dstType); | |
} | |
var srcType = $d.getTypeFuncFromInst(obj); | |
if (!$d.typeIsAssignableFrom(dstType, srcType)) | |
throw new System.InvalidCastException.ctor("can't cast object of type " + $d.getTypeFuncName(srcType) + " to type " + $d.getTypeFuncName(dstType)); | |
return obj; | |
}; | |
$d.ncast = function ncast(x, t, uncheck) { | |
if (x == null) | |
return null; | |
if (!uncheck) | |
$d.check(x, t); | |
switch (t.$typeKind) { | |
case 41: | |
x = $d.toInt8(x); | |
break; | |
case 42: | |
x &= 255; | |
break; | |
case 43: | |
x = $d.toInt16(x); | |
break; | |
case 40: | |
case 44: | |
x &= 65535; | |
break; | |
case 45: | |
x |= 0; | |
break; | |
case 46: | |
x = $d.toUInt32(x); | |
break; | |
case 47: | |
x = $d.toInt64(x); | |
break; | |
case 48: | |
x = $d.toUInt64(x); | |
break; | |
} | |
return x; | |
}; | |
$d.typeIsAssignableFrom = function typeIsAssignableFrom(dstType, srcType) { | |
if (dstType == srcType || (srcType.prototype instanceof dstType)) | |
return true; | |
var srcTypeKind = srcType.$typeKind; | |
if (srcTypeKind != null && srcTypeKind != 68) { | |
var dstTypeKind = dstType.$typeKind; | |
if ((dstTypeKind == 1) || (srcTypeKind == 4 && dstTypeKind == 65)) | |
return true; | |
if ((dstType.$typeKind & 32) != 0) { | |
return (srcTypeKind == 61 && dstTypeKind >= 40 && dstTypeKind <= 51) || (dstTypeKind == 56 && $d.typeIsAssignableFrom(dstType.$underlyingType, | |
srcType)); | |
} | |
if (dstTypeKind == 64) { | |
return (srcTypeKind == 64) && (srcType.$arrayRank == dstType.$arrayRank) && (dstType.$elementType.$typeKind & 32) == 0 && (srcType.$elementType.$typeKind & 32) == 0 && $d.typeIsAssignableFrom(dstType.$elementType, | |
srcType.$elementType); | |
} | |
var srcBaseType = (srcTypeKind & 32) != 0 ? System.ValueType : (srcTypeKind == 64) ? Array : null; | |
if (srcBaseType && (dstType == srcBaseType || (srcBaseType.prototype instanceof dstType))) | |
return true; | |
if (dstTypeKind == 66 && srcType.$intfs != null) { | |
if (srcTypeKind == 61 && (dstType.$unconstructedType == System.IComparable$1 || dstType.$unconstructedType == System.IEquatable$1) && (dstType.$typeArgs[0].$typeKind >= 40 && dstType.$typeArgs[0].$typeKind <= 51)) | |
return true; | |
if (srcType.$intfs.constructor == Function) | |
srcType.$intfs = srcType.$intfs(); | |
return srcType.$intfs.indexOf(dstType) != -1; | |
} | |
} | |
return false; | |
}; | |
$d.delegate = function delegate(method, target) { | |
var dlgFunc = target ? method.bind(target) : method; | |
var dlgProto = System.Delegate.prototype; | |
dlgFunc.constructor = dlgProto.constructor; | |
dlgFunc.get_Method = dlgProto.get_Method; | |
dlgFunc.get_Target = dlgProto.get_Target; | |
dlgFunc.Invoke = dlgProto.Invoke; | |
dlgFunc.GetInvocationList = dlgProto.GetInvocationList; | |
dlgFunc.Equals = dlgProto.Equals; | |
dlgFunc.DynamicInvoke = dlgProto.DynamicInvoke; | |
dlgFunc.GetType = dlgProto.GetType; | |
dlgFunc.ToString = dlgProto.ToString; | |
dlgFunc.toString = dlgProto.toString; | |
dlgFunc.GetHashCode = dlgProto.GetHashCode; | |
dlgFunc.method = method; | |
dlgFunc.target = target; | |
return dlgFunc; | |
}; | |
$d.array = function array_(T, array, ranks, forceUntyped) { | |
var elementType = $d.resolveTypeFunc(T); | |
var isLength = (typeof array === "number"); | |
if (!isLength && array.$type && array.$type.$elementType) { | |
if (array.$type.$elementType === elementType) | |
return array; | |
else | |
throw new Error("element type mismatch"); | |
} | |
var arrayType = $d.arrayType(elementType, ranks ? ranks.length : 1); | |
var arrayCtor = forceUntyped ? Array : elementType.$arrayCtor; | |
if (isLength || !(array instanceof arrayCtor)) { | |
array = new arrayCtor(array); | |
} | |
if (isLength && (elementType.$typeKind & 32) != 0 && arrayCtor == Array) { | |
var dv = $d.default(elementType); | |
for (var i = 0; i < array.length; ++i) { | |
array[i] = dv; | |
} | |
} | |
array.$type = arrayType; | |
if (ranks != null) | |
array.$ranks = ranks; | |
return array; | |
}; | |
$d.arrayType = function arrayType(elementType, rank) { | |
if (elementType.$arrayCtor == null) { | |
var arrayCtor; | |
var elementTypeKind = (elementType.$typeKind == 63) ? elementType.$underlyingType : elementType.$typeKind; | |
switch (elementTypeKind) { | |
case 41: | |
arrayCtor = Int8Array; | |
break; | |
case 43: | |
arrayCtor = Int16Array; | |
break; | |
case 45: | |
arrayCtor = Int32Array; | |
break; | |
case 39: | |
case 42: | |
arrayCtor = Uint8Array; | |
break; | |
case 40: | |
case 44: | |
arrayCtor = Uint16Array; | |
break; | |
case 46: | |
arrayCtor = Uint32Array; | |
break; | |
case 50: | |
arrayCtor = Float32Array; | |
break; | |
case 51: | |
arrayCtor = Float64Array; | |
break; | |
default: | |
arrayCtor = Array; | |
break; | |
} | |
var dstPrototype = arrayCtor.prototype; | |
if (dstPrototype.CopyTo == null) | |
$d.copyPrototype(Array.prototype, dstPrototype); | |
elementType.$arrayCtor = arrayCtor; | |
} | |
if (rank == null) | |
rank = 1; | |
var arrayTypeKey = "$arrayType" + rank; | |
var result = elementType[arrayTypeKey]; | |
if (result == null || !elementType.hasOwnProperty(arrayTypeKey)) { | |
var typeName = (rank == 1) ? "" : (rank == 2) ? "," : (rank == 3) ? ",," : new Array(rank).join(","); | |
typeName = elementType.$typeName + "[" + typeName + "]"; | |
var arrayType = $d.declare(typeName, System.Array$1.$baseType, 64, null, System.Array$1.$typeInit, | |
[elementType]); | |
arrayType.$arrayRank = rank; | |
arrayType.$elementType = elementType; | |
elementType[arrayTypeKey] = arrayType; | |
result = arrayType; | |
} | |
return result; | |
}; | |
$d.genericType = function genericType(unconstructedType, typeArgs) { | |
if (typeArgs.length == 0) | |
return unconstructedType; | |
var cache = unconstructedType.$typeCache; | |
if (cache == null) { | |
cache = {}; | |
unconstructedType.$typeCache = cache; | |
} | |
for (var i = 0; i < typeArgs.length; i++) { | |
typeArgs[i] = $d.resolveTypeFunc(typeArgs[i]); | |
} | |
var keyString; | |
if (typeArgs.length == 1) | |
keyString = typeArgs[0].$typeName; | |
else | |
if (typeArgs.length == 2) | |
keyString = typeArgs[0].$typeName + ", " + typeArgs[1].$typeName; | |
else | |
if (typeArgs.length == 3) | |
keyString = typeArgs[0].$typeName + ", " + typeArgs[1].$typeName + ", " + typeArgs[2].$typeName; | |
else { | |
var keyParts = new Array(typeArgs.length); | |
for (var i = 0; i < typeArgs.length; i++) { | |
keyParts[i] = typeArgs[i].$typeName; | |
} | |
keyString = keyParts.join(", "); | |
} | |
var result = cache[keyString]; | |
if (result == null) { | |
var generic = $d.declare(unconstructedType.$typeName, unconstructedType.$baseTypeU || unconstructedType.$baseType, | |
unconstructedType.$typeKind & ~256 | 1024, unconstructedType.$declaringType || unconstructedType.$assembly, | |
unconstructedType.$typeInit, typeArgs, unconstructedType.$baseTypeArgs); | |
generic.$typeName = unconstructedType.$typeName + "<" + keyString + ">"; | |
generic.$unconstructedType = unconstructedType; | |
result = generic; | |
cache[keyString] = result; | |
} | |
return result; | |
}; | |
$d.toString = function toString(o) { return o == null ? "" : o.toString(); }; | |
$d.equals = function equals(objA, objB) { | |
if (objA == null) | |
throw new System.NullReferenceException.ctor$1("objA"); | |
else | |
if (typeof objA.Equals === "function") | |
return objA.Equals(objB); | |
return (objA == null && objB == null) || (objA === objB); | |
}; | |
$d.getHashCode = function getHashCode(obj) { | |
if (obj == null) | |
throw new System.NullReferenceException.ctor$1("can't get hash code of null"); | |
if (typeof obj.GetHashCode === "function") | |
return obj.GetHashCode(); | |
else | |
return System.Object.prototype.GetHashCode.call(obj); | |
}; | |
$d.getTypeFuncName = function getTypeFuncName(typeFunc) { | |
return typeFunc.hasOwnProperty("$typeName") ? typeFunc.$typeName : typeFunc.name || (typeFunc.toString().match(/^\s*function\s*([^\s(]+)/) || (typeFunc.toString().match(/^\[object\s*([^\s\]]+)/)) || [])[1] || "Object"; | |
}; | |
$d.resolveTypeFunc = function resolveTypeFunc(typeFunc) { | |
if (typeFunc == null) | |
throw new System.NullReferenceException.ctor$1("can't get type function of null"); | |
if (typeFunc.$typeKind != null && (typeFunc.$typeKind != 68 || typeFunc.hasOwnProperty("$typeKind"))) | |
return typeFunc; | |
if (typeFunc === Function) | |
return System.Delegate; | |
if (typeFunc.BYTES_PER_ELEMENT != null) { | |
if (typeFunc === Int8Array) | |
return $d.arrayType(System.SByte, 1); | |
if (typeFunc === Int16Array) | |
return $d.arrayType(System.Int16, 1); | |
if (typeFunc === Int32Array) | |
return $d.arrayType(System.Int32, 1); | |
if (typeFunc === Uint8Array) | |
return $d.arrayType(System.Byte, 1); | |
if (typeFunc === Uint16Array) | |
return $d.arrayType(System.UInt16, 1); | |
if (typeFunc === Uint32Array) | |
return $d.arrayType(System.UInt32, 1); | |
if (typeFunc === Float32Array) | |
return $d.arrayType(System.Single, 1); | |
if (typeFunc === Float64Array) | |
return $d.arrayType(System.Double, 1); | |
} | |
if (!(typeFunc instanceof Object)) | |
throw new System.Exception.ctor$1("typeFunc is invalid (must be a object/function)"); | |
typeFunc.$typeName = $d.getTypeFuncName(typeFunc); | |
typeFunc.$typeKind = 68; | |
return typeFunc; | |
}; | |
$d.getTypeFuncFromInst = function getTypeFuncFromInst(instance) { | |
if (instance == null) | |
throw new System.NullReferenceException.ctor$1("can't get type of null"); | |
var typeFunc = instance.$type || instance.constructor; | |
if ((typeFunc === Array) && typeFunc.$elementType == null) | |
typeFunc = $d.arrayType(Object, 1); | |
return typeFunc; | |
}; | |
$d.getTypeFromInst = function getTypeFromInst(instance) { | |
var typeFunc = $d.getTypeFuncFromInst(instance); | |
return $d.typeOf(typeFunc); | |
}; | |
$d.retype = function retype(obj, typeFunc) { | |
obj.constructor = typeFunc; | |
}; | |
$d.typeOf = function typeOf(typeFunc) { | |
if (typeFunc.$type == null || (typeFunc.$typeKind == 68 && !typeFunc.hasOwnProperty("$type"))) { | |
typeFunc = $d.resolveTypeFunc(typeFunc); | |
typeFunc.$type = typeFunc.$typeInfo ? System.Type.Create(typeFunc, typeFunc.$typeInfo(typeFunc, | |
typeFunc.prototype)) : (typeFunc.$typeKind == 63) ? System.Type.CreateEnum(typeFunc) : new System.Type.ctor(typeFunc, | |
2097152, null, null, null, null, null, null); | |
} | |
return typeFunc.$type; | |
}; | |
$d.typesOf = function typesOf(typeFuncs) { | |
if (typeFuncs != null && typeFuncs.length > 0) { | |
var types = typeFuncs.map(function(x) { | |
return $d.typeOf(x); | |
}); | |
return $d.array(System.Type, types); | |
} | |
else | |
return System.Type().EmptyTypes; | |
}; | |
$d.assemblyOf = function assemblyOf(assemblyFunc) { | |
if (assemblyFunc.$assembly == null) | |
assemblyFunc.$assembly = new System.Reflection.Assembly.ctor(assemblyFunc, assemblyFunc.$getAttrs()); | |
return assemblyFunc.$assembly; | |
}; | |
$d.mdi = function mdi(array) { | |
var ranks = array.$ranks; | |
var result = arguments[1]; | |
for (var k = 1; k < ranks.length; ++k) { | |
result = result * ranks[k] + arguments[k + 1]; | |
} | |
return result; | |
}; | |
$d.tryDecodeTypeFunc = function tryDecodeTypeFunc(typeFunc) { | |
var result = typeFunc; | |
if (typeof typeFunc === "number") { | |
result = System.Type().EncodedTypes[typeFunc & -161]; | |
if (result == null) | |
throw new Error("invalid type-code"); | |
if ((typeFunc & 128) != 0) | |
result = $d.arrayType(result, 1); | |
} | |
return result; | |
}; | |
$d.boxEnum = function boxEnum(enumType, value) { | |
if (value.constructor == enumType) | |
return value; | |
if (value.constructor != Number) | |
throw new Error("value must be number"); | |
var boxedEnums = enumType.$boxedEnums; | |
if (boxedEnums == null) { | |
boxedEnums = {}; | |
enumType.$boxedEnums = boxedEnums; | |
} | |
var result = boxedEnums[value]; | |
if (result == null) { | |
result = new System.Enum.ctor(enumType, value); | |
boxedEnums[value] = result; | |
} | |
return result; | |
}; | |
$d.binarySearch = function binarySearch(array, value, index, length) { | |
var lo = $d.ncl(index, 0); | |
var hi = lo + ($d.ncl(length, array.length)) - 1; | |
while (lo <= hi) { | |
var i = lo + ((hi - lo) >> 1); | |
var current = array[i]; | |
if (current < value) | |
lo = i + 1; | |
else | |
if (current > value) | |
hi = i - 1; | |
else | |
return i; | |
} | |
return ~lo; | |
}; | |
$d.shallowCopy = function shallowCopy(source, target) { | |
if (source === target) | |
return; | |
var keys = Object.keys(source); | |
for (var i = 0; i < keys.length; ++i) { | |
var k = keys[i]; | |
target[k] = source[k]; | |
} | |
}; | |
$d.sign = function sign(x) { | |
return (typeof x === "number") ? x ? x < 0 ? -1 : 1 : (x === x) ? 0 : NaN : NaN; | |
}; | |
$d.check = function check(x, t) { | |
if (x < t.MinValue || x > t.MaxValue || isNaN(x)) | |
throw new System.OverflowException.ctor(); | |
return x; | |
}; | |
$d.toInt8 = function toInt8(x) { return (x & 255) - ((x & 128) ? 256 : 0); }; | |
$d.toInt16 = function toInt16(x) { return (x & 65535) - ((x & 32768) ? 65536 : 0); }; | |
$d.toUInt32 = function toUInt32(x) { return (x | 0) + ((x & 2147483648) ? 4294967296 : 0); }; | |
$d.toInt64 = function toInt64(x) { return x < -9007199254740991 ? -9007199254740991 : x > 9007199254740991 ? 9007199254740991 : x > 0 ? Math.floor(x) : Math.ceil(x); }; | |
$d.toUInt64 = function toUInt64(x) { return x < 0 ? 0 : x > 9007199254740991 ? 9007199254740991 : x > 0 ? Math.floor(x) : Math.ceil(x); }; | |
$d.signEx = function signEx(e, offset) { | |
if (e == null) | |
throw new System.NullReferenceException.ctor(); | |
if ($d.is(e, System.Exception)) { | |
offset = $d.ncl(offset, 1); | |
var error = new Error(); | |
var stackTrace = error.stack; | |
if (stackTrace == null) { | |
stackTrace = $d.extractStackTrace(error); | |
offset++; | |
} | |
if (stackTrace != null) { | |
var stack = stackTrace.split("\n"); | |
if (/^error$/i.test(stack[0])) | |
offset++; | |
stack.splice(0, offset); | |
stackTrace = stack.join("\n"); | |
} | |
e.stack = stackTrace; | |
e.message = e.toString(); | |
} | |
return e; | |
}; | |
$d.extractStackTrace = function extractStackTrace(error) { | |
var result = ""; | |
try { | |
throw error; | |
} | |
catch ($e) { | |
result = error.stack || ""; | |
} | |
return result; | |
}; | |
$d.copyPrototype = function copyPrototype(srcPrototype, dstObject) { | |
for (var property in srcPrototype) { | |
dstObject[property] = srcPrototype[property]; | |
} | |
}; | |
$d.nv = function nv(n) { | |
if (n == null) | |
throw new System.InvalidOperationException.ctor$1("Nullable has no value"); | |
else | |
return n; | |
}; | |
$d.ncl = function ncl(a, b) { return (a != null) ? a : b; }; | |
$d.nle = function nle(a, b) { return (a != null) && (b != null) && (a <= b); }; | |
$d.nge = function nge(a, b) { return (a != null) && (b != null) && (a >= b); }; | |
$d.nlt = function nlt(a, b) { return (a != null) && (b != null) && (a < b); }; | |
$d.ngt = function ngt(a, b) { return (a != null) && (b != null) && (a > b); }; | |
$d.nsub = function nsub(a, b) { return (a != null) && (b != null) ? (a - b) : null; }; | |
$d.nadd = function nadd(a, b) { return (a != null) && (b != null) ? (a + b) : null; }; | |
$d.nmod = function nmod(a, b) { return (a != null) && (b != null) ? (a % b) : null; }; | |
$d.ndiv = function ndiv(a, b) { return (a != null) && (b != null) ? (a / b) | 0 : null; }; | |
$d.ndivf = function ndivf(a, b) { return (a != null) && (b != null) ? (a / b) : null; }; | |
$d.nmul = function nmul(a, b) { return (a != null) && (b != null) ? (a * b) : null; }; | |
$d.nband = function nband(a, b) { return (a != null) && (b != null) ? (a & b) : null; }; | |
$d.nbor = function nbor(a, b) { return (a != null) && (b != null) ? (a | b) : null; }; | |
$d.nbxor = function nbxor(a, b) { return (a != null) && (b != null) ? (a ^ b) : null; }; | |
$d.nshl = function nshl(a, b) { return (a != null) && (b != null) ? (a << b) : null; }; | |
$d.nshr = function nshr(a, b) { return (a != null) && (b != null) ? (a >> b) : null; }; | |
$d.nand = function nand(a, b) { return ((a === true) && (b === true)) ? true : ((a === false) || (b === false)) ? false : null; }; | |
$d.nor = function nor(a, b) { return ((a === true) || (b === true)) ? true : ((a === false) && (b === false)) ? false : null; }; | |
$d.nnot = function nnot(a) { return (a != null) ? !a : null; }; | |
$d.nneg = function nneg(a) { return (a != null) ? -a : null; }; | |
$d.npos = function npos(a) { return (a != null) ? +a : null; }; | |
$d.ncpl = function ncpl(a) { return (a != null) ? ~a : null; }; | |
$d.nlu = function nlu(op, a) { return (a != null) ? op.call(null, a) : null; }; | |
$d.nlb = function nlb(op, a, b) { return (a != null) && (b != null) ? op.call(null, a, b) : null; }; | |
$d.neq = function neq(op, a, b) { return (a == b) || ((a != null) && (b != null) && op.call(null, a, b)); }; | |
$d.nne = function nne(op, a, b) { return ((a == null) != (b == null)) || ((a != null) && op.call(null, a, b)); }; | |
System.Object = $d.declare("System.Object", Object, 1, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["GetType", p.GetType, 6], ["ToString", p.ToString, 6], ["Equals", p.Equals, 6], ["Equals", t.Equals, 22], ["GetHashCode", p.GetHashCode, 6], ["ReferenceEquals", t.ReferenceEquals, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function Object() { | |
var type = this.constructor; | |
type(); | |
while (type != $t) { | |
if (type.$ator) | |
type.$ator.call(this); | |
type = type.$baseType; | |
} | |
}; | |
$t.ctor.prototype = $p; | |
$p.GetType = function Object_GetType() { | |
return $d.getTypeFromInst(this); | |
}; | |
$p.ToString = function Object_ToString() { | |
if (this == null) | |
return ""; | |
return "{" + $d.getTypeFromInst(this).get_FullName() + "}"; | |
}; | |
$p.toString = function Object_toString() { | |
return this.ToString(); | |
}; | |
$p.Equals = function Object_Equals(obj) { | |
return this == obj; | |
}; | |
$t.Equals = function Object_Equals(objA, objB) { | |
if (objA == objB) | |
return true; | |
if (objA == null || objB == null) | |
return false; | |
else | |
return $d.equals(objA, objB); | |
}; | |
$p.GetHashCode = function Object_GetHashCode() { | |
if (this.__hashCode == null) | |
this.__hashCode = ((Math.random() * 4294967296) | 0); | |
return this.__hashCode; | |
}; | |
$t.ReferenceEquals = function Object_ReferenceEquals(objA, objB) { | |
return (objA === objB); | |
}; | |
}); | |
$d.declare("0", null, 69, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, null, [["get_Name", p.get_Name, 6], ["get_Value", p.get_Value, 6]], [["ctor", t.ctor, 6]], [["Name", 20, 0], ["Value", 1, 1]]]; }; | |
$t.ctor = function(name, value) { | |
this.Name = name; | |
this.Value = value; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Name = function() { | |
return this.Name; | |
}; | |
$p.get_Value = function() { | |
return this.Value; | |
}; | |
}); | |
System.Delegate = $d.declare("System.Delegate", System.Object, 4, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, [["target", 1, 35]], [["get_Method", p.get_Method, 6], ["get_Target", p.get_Target, 6], ["GetInvocationList", p.GetInvocationList, 6], ["Combine", t.Combine, 22], ["Remove", t.Remove, 22], ["RemoveAll", t.RemoveAll, 22], ["Equals", p.Equals, 6], ["op_Equality", t.op_Equality, 22], ["op_Inequality", t.op_Inequality, 22], ["DynamicInvoke", p.DynamicInvoke, 6]], [["ctor", t.ctor, 4]], [["Method", Function, 0], ["Target", 1, 1]]]; }; | |
$t.$ator = function() { | |
this.method = null; | |
this.target = null; | |
}; | |
$t.ctor = function Delegate(method, target) { | |
$t.$baseType.ctor.call(this); | |
this.method = method; | |
this.target = target; | |
}; | |
$p.get_Method = function Delegate_get_Method() { | |
return this.method; | |
}; | |
$p.get_Target = function Delegate_get_Target() { | |
return this.target; | |
}; | |
$p.Invoke = function Delegate_Invoke() { | |
return this.method.apply(this.target, arguments); | |
}; | |
$p.GetInvocationList = function Delegate_GetInvocationList() { | |
return $d.array(System.Delegate, [this]); | |
}; | |
$t.Combine = function Delegate_Combine(a, b) { | |
if (a == null) | |
return b; | |
else | |
if (b == null) | |
return a; | |
else { | |
if (a.Equals === System.MulticastDelegate.prototype.Equals) | |
return System.MulticastDelegate.Combine(a, b); | |
else | |
return System.MulticastDelegate.Create(a.get_Target(), [a, b]); | |
} | |
}; | |
$t.Remove = function Delegate_Remove(source, value) { | |
if (System.Delegate.op_Equality(source, value) || source == null) | |
return null; | |
else { | |
if (source.Equals === System.MulticastDelegate.prototype.Equals) | |
return System.MulticastDelegate.Remove(source, value); | |
else | |
return source; | |
} | |
}; | |
$t.RemoveAll = function Delegate_RemoveAll(source, value) { | |
var newDelegate = null; | |
do { | |
newDelegate = source; | |
source = $t.Remove(source, value); | |
} | |
while (System.Delegate.op_Inequality(newDelegate, source)); | |
return newDelegate; | |
}; | |
$p.Equals = function Delegate_Equals(obj) { | |
if (obj === this) | |
return true; | |
if (obj == null || !(this.constructor === obj.constructor)) | |
return false; | |
var d = obj; | |
return ((this.Equals === d.Equals) && this.target == d.target && this.method == d.method); | |
}; | |
$t.op_Equality = function Delegate_op_Equality(d1, d2) { | |
if (d1 == null) | |
return (d2 == null); | |
return d1.Equals(d2); | |
}; | |
$t.op_Inequality = function Delegate_op_Inequality(d1, d2) { | |
if (d1 == null) | |
return d2 != null; | |
return !d1.Equals(d2); | |
}; | |
$p.DynamicInvoke = function Delegate_DynamicInvoke(args) { | |
return this.method.apply(this, args); | |
}; | |
}); | |
System.MulticastDelegate = $d.declare("System.MulticastDelegate", System.Delegate, 3, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["GetInvocationList", p.GetInvocationList, 6], ["Combine", t.Combine, 19], ["Remove", t.Remove, 19], ["Equals", p.Equals, 6]]]; }; | |
$t.$ator = function() { | |
this.invocations = null; | |
}; | |
$t.ctor = function MulticastDelegate(method, target, invocations) { | |
$t.$baseType.ctor.call(this, method, target); | |
this.invocations = invocations; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function MulticastDelegate_Create(target, invocations) { | |
var result = function() { | |
for (var i = 0; i < invocations.length; i++) { | |
var d = invocations[i]; | |
d.method.apply(d.target, arguments); | |
} | |
}; | |
$d.delegate(result); | |
var dlgProto = System.MulticastDelegate.prototype; | |
result.Equals = dlgProto.Equals; | |
result.GetInvocationList = dlgProto.GetInvocationList; | |
result.invocations = invocations; | |
return result; | |
}; | |
$p.GetInvocationList = function MulticastDelegate_GetInvocationList() { | |
return $d.array(System.Delegate, this.invocations); | |
}; | |
$t.Combine = function MulticastDelegate_Combine(src, value) { | |
var newInvocations = (src.invocations == null) ? [value] : src.invocations.concat(value); | |
return $t.Create(src.get_Target(), newInvocations); | |
}; | |
$t.Remove = function MulticastDelegate_Remove(src, value) { | |
var result = src; | |
for (var i = src.invocations.length - 1; i >= 0; --i) { | |
if (System.Delegate.op_Equality(src.invocations[i], value)) { | |
var newInvocations = src.invocations.slice(); | |
newInvocations.splice(i, 1); | |
result = (newInvocations.length == 0) ? null : (newInvocations.length == 1) ? newInvocations[0] : $t.Create(src.get_Target(), | |
newInvocations); | |
break; | |
} | |
} | |
return result; | |
}; | |
$p.Equals = function MulticastDelegate_Equals(obj) { | |
if (obj === this) | |
return true; | |
if (obj == null || !(this.constructor === obj.constructor)) | |
return false; | |
var d = obj; | |
if (!(this.Equals === d.Equals)) | |
return false; | |
if (this.invocations.length != d.invocations.length) | |
return false; | |
for (var i = 0; i < this.invocations.length; i++) { | |
if (!this.invocations[i].Equals(d.invocations[i])) | |
return false; | |
} | |
return true; | |
}; | |
}); | |
System.Action = $d.declare("System.Action", null, 65, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}); | |
System.Action$1 = $d.declare("System.Action`1", null, 321, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T"]); | |
System.Action$2 = $d.declare("System.Action`2", null, 321, $asm, function($t, $p, T1, T2) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2"]); | |
System.Action$3 = $d.declare("System.Action`3", null, 321, $asm, function($t, $p, T1, T2, T3) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3"]); | |
System.Action$4 = $d.declare("System.Action`4", null, 321, $asm, function($t, $p, T1, T2, T3, T4) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4"]); | |
System.Action$5 = $d.declare("System.Action`5", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5"]); | |
System.Action$6 = $d.declare("System.Action`6", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6"]); | |
System.Action$7 = $d.declare("System.Action`7", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7"]); | |
System.Action$8 = $d.declare("System.Action`8", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7, T8) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7", "T8"]); | |
System.Func$1 = $d.declare("System.Func`1", null, 321, $asm, function($t, $p, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["TResult"]); | |
System.Func$2 = $d.declare("System.Func`2", null, 321, $asm, function($t, $p, T1, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "TResult"]); | |
System.Func$3 = $d.declare("System.Func`3", null, 321, $asm, function($t, $p, T1, T2, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "TResult"]); | |
System.Func$4 = $d.declare("System.Func`4", null, 321, $asm, function($t, $p, T1, T2, T3, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "TResult"]); | |
System.Func$5 = $d.declare("System.Func`5", null, 321, $asm, function($t, $p, T1, T2, T3, T4, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "TResult"]); | |
System.Func$6 = $d.declare("System.Func`6", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "TResult"]); | |
System.Func$7 = $d.declare("System.Func`7", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "TResult"]); | |
System.Func$8 = $d.declare("System.Func`8", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7", "TResult"]); | |
System.Func$9 = $d.declare("System.Func`9", null, 321, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7, T8, TResult) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "TResult"]); | |
System.Comparison$1 = $d.declare("System.Comparison`1", null, 321, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T"]); | |
System.Converter$2 = $d.declare("System.Converter`2", null, 321, $asm, function($t, $p, TInput, TOutput) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["TInput", "TOutput"]); | |
System.Predicate$1 = $d.declare("System.Predicate`1", null, 321, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["T"]); | |
System.Exception = $d.declare("System.Exception", System.Object, 28, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["message", 20, 3], ["stack", 20, 3]], [["get_Data", p.get_Data, 6], ["get_InnerException", p.get_InnerException, 6], ["get_Message", p.get_Message, 6], ["get_StackTrace", p.get_StackTrace, 6], ["ToString", p.ToString, 6], ["GetBaseException", p.GetBaseException, 6], ["Wrap", t.Wrap, 22]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]], [["Data", System.Collections.IDictionary, 0], ["InnerException", 28, 1], ["Message", 20, 2], ["StackTrace", 20, 3]]]; }; | |
$t.$ator = function() { | |
this._data = null; | |
this._innerException = null; | |
this._message = null; | |
this.message = null; | |
this.stack = null; | |
}; | |
$p.get_Data = function Exception_get_Data() { | |
if (this._data == null) | |
this._data = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object).ctor)(); | |
return this._data; | |
}; | |
$p.get_InnerException = function Exception_get_InnerException() { | |
return this._innerException; | |
}; | |
$p.get_Message = function Exception_get_Message() { | |
return this._message; | |
}; | |
$p.get_StackTrace = function Exception_get_StackTrace() { | |
return this.stack; | |
}; | |
$t.ctor = function Exception() { | |
$t.ctor$3.call(this, null, null, 3); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function Exception(message) { | |
$t.ctor$3.call(this, message, null, 3); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function Exception(message, innerException) { | |
$t.ctor$3.call(this, message, innerException, 3); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function Exception(message, innerException, offset) { | |
$t.$baseType.ctor.call(this); | |
this._message = message; | |
this._innerException = innerException; | |
$d.signEx(this, offset); | |
}; | |
$t.ctor$3.prototype = $p; | |
$p.ToString = function Exception_ToString() { | |
var builder = new System.Text.StringBuilder.ctor(); | |
builder.Append$12(this.constructor.$typeName); | |
if (this.get_Message() != null) | |
builder.AppendLine$1(": " + this.get_Message()); | |
else | |
builder.AppendLine(); | |
if (this.stack != null) | |
builder.AppendLine$1(this.stack); | |
return builder.toString(); | |
}; | |
$p.GetBaseException = function Exception_GetBaseException() { | |
var inner = this.get_InnerException(); | |
var back = this; | |
while (inner != null) { | |
back = inner; | |
inner = inner.get_InnerException(); | |
} | |
return back; | |
}; | |
$t.Wrap = function Exception_Wrap(e) { | |
if ($d.is(e, System.Exception)) | |
return e; | |
var error = e; | |
var result; | |
if (error instanceof TypeError) | |
result = new System.NullReferenceException.ctor$1(error.message); | |
else | |
if (error instanceof RangeError) | |
result = new System.ArgumentOutOfRangeException.ctor$1(error.message); | |
else | |
if (error instanceof Error) | |
result = new System.Exception.ctor$1(error.message); | |
else | |
result = new System.Runtime.CompilerServices.RuntimeWrappedException.ctor(error.toString(), | |
error); | |
result.stack = error.stack; | |
return result; | |
}; | |
}); | |
System.AggregateException = $d.declare("System.AggregateException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["GetBaseException", p.GetBaseException, 6], ["get_InnerExceptions", p.get_InnerExceptions, 6], ["Handle", p.Handle, 6], ["Flatten", p.Flatten, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6], ["ctor$3", t.ctor$3, 6], ["ctor$5", t.ctor$5, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$4", t.ctor$4, 6], ["ctor$6", t.ctor$6, 6]], [["InnerExceptions", System.Collections.Generic.List$1(System.Exception), 1]]]; }; | |
$t.$ator = function() { | |
this.m_innerExceptions = null; | |
}; | |
$t.ctor = function AggregateException() { | |
$t.$baseType.ctor$1.call(this, "AggregateException_ctor_DefaultMessage"); | |
this.m_innerExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor$1)($d.array(System.Exception, | |
0)); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$3 = function AggregateException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
this.m_innerExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor$1)($d.array(System.Exception, | |
0)); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$5 = function AggregateException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
if (innerException == null) { | |
throw new System.ArgumentNullException.ctor$1("innerException"); | |
} | |
this.m_innerExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor$1)($d.array(System.Exception, | |
[innerException])); | |
}; | |
$t.ctor$5.prototype = $p; | |
$t.ctor$1 = function AggregateException(innerExceptions) { | |
$t.ctor$4.call(this, "AggregateException_ctor_DefaultMessage", innerExceptions); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function AggregateException(innerExceptions) { | |
$t.ctor$6.call(this, "AggregateException_ctor_DefaultMessage", innerExceptions); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$4 = function AggregateException(message, innerExceptions) { | |
$t.ctor$7.call(this, message, innerExceptions == null ? null : new (System.Collections.Generic.List$1(System.Exception).ctor$1)(innerExceptions)); | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.ctor$6 = function AggregateException(message, innerExceptions) { | |
$t.ctor$7.call(this, message, $d.cast(innerExceptions, System.Collections.Generic.IList$1(System.Exception))); | |
}; | |
$t.ctor$6.prototype = $p; | |
$t.ctor$7 = function AggregateException(message, innerExceptions) { | |
$t.$baseType.ctor$2.call(this, message, innerExceptions != null && innerExceptions.System$Collections$Generic$ICollection$1$get_Count() > 0 ? innerExceptions.System$Collections$Generic$IList$1$get_Item(0) : null); | |
if (innerExceptions == null) { | |
throw new System.ArgumentNullException.ctor$1("innerExceptions"); | |
} | |
var exceptionsCopy = $d.array(System.Exception, innerExceptions.System$Collections$Generic$ICollection$1$get_Count()); | |
for (var i = 0; i < exceptionsCopy.length; i++) { | |
exceptionsCopy[i] = innerExceptions.System$Collections$Generic$IList$1$get_Item(i); | |
if (exceptionsCopy[i] == null) { | |
throw new System.ArgumentException.ctor$1("AggregateException_ctor_InnerExceptionNull"); | |
} | |
} | |
this.m_innerExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor$1)(exceptionsCopy); | |
}; | |
$t.ctor$7.prototype = $p; | |
$p.GetBaseException = function AggregateException_GetBaseException() { | |
var back = this; | |
var backAsAggregate = this; | |
while (backAsAggregate != null && backAsAggregate.get_InnerExceptions().get_Count() == 1) { | |
back = back.get_InnerException(); | |
backAsAggregate = $d.as(back, System.AggregateException); | |
} | |
return back; | |
}; | |
$p.get_InnerExceptions = function AggregateException_get_InnerExceptions() { | |
return this.m_innerExceptions; | |
}; | |
$p.Handle = function AggregateException_Handle(predicate) { | |
if (predicate == null) { | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
} | |
var unhandledExceptions = null; | |
for (var i = 0; i < this.m_innerExceptions.get_Count(); i++) { | |
if (!predicate(this.m_innerExceptions.get_Item(i))) { | |
if (unhandledExceptions == null) { | |
unhandledExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor)(); | |
} | |
unhandledExceptions.Add(this.m_innerExceptions.get_Item(i)); | |
} | |
} | |
if (unhandledExceptions != null) { | |
throw new System.AggregateException.ctor$7(this.get_Message(), unhandledExceptions); | |
} | |
}; | |
$p.Flatten = function AggregateException_Flatten() { | |
var flattenedExceptions = new (System.Collections.Generic.List$1(System.Exception).ctor)(); | |
var exceptionsToFlatten = new (System.Collections.Generic.List$1(System.AggregateException).ctor)(); | |
exceptionsToFlatten.Add(this); | |
var nDequeueIndex = 0; | |
while (exceptionsToFlatten.get_Count() > nDequeueIndex) { | |
var currentInnerExceptions = exceptionsToFlatten.get_Item(nDequeueIndex++).get_InnerExceptions(); | |
for (var i = 0; i < currentInnerExceptions.System$Collections$Generic$ICollection$1$get_Count(); i++) { | |
var currentInnerException = currentInnerExceptions.System$Collections$Generic$IList$1$get_Item(i); | |
if (currentInnerException == null) { | |
continue; | |
} | |
var currentInnerAsAggregate = $d.as(currentInnerException, System.AggregateException); | |
if (currentInnerAsAggregate != null) { | |
exceptionsToFlatten.Add(currentInnerAsAggregate); | |
} | |
else { | |
flattenedExceptions.Add(currentInnerException); | |
} | |
} | |
} | |
return new System.AggregateException.ctor$7(this.get_Message(), flattenedExceptions); | |
}; | |
$p.ToString = function AggregateException_ToString() { | |
var text = ""; | |
for (var i = 0; i < this.m_innerExceptions.get_Count(); i++) { | |
text += $d.toString(this.m_innerExceptions.get_Item(i)) + "<---\n"; | |
} | |
return text; | |
}; | |
}); | |
System.AppDomain = $d.declare("System.AppDomain", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_CurrentDomain", t.get_CurrentDomain, 22], ["GetAssemblies", p.GetAssemblies, 6]], [["ctor", t.ctor, 6]], [["CurrentDomain", System.AppDomain, 0]]]; }; | |
$t.cctor = function() { | |
$t.instance = new System.AppDomain.ctor(); | |
}; | |
$t.ctor = function AppDomain() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.get_CurrentDomain = function AppDomain_get_CurrentDomain() { | |
return $t().instance; | |
}; | |
$p.GetAssemblies = function AppDomain_GetAssemblies() { | |
var assemblies = $d.$assemblies; | |
var result = Object.keys(assemblies).map(function(n) { | |
return $d.assemblyOf(assemblies[n]); | |
}); | |
return $d.array(System.Reflection.Assembly, result); | |
}; | |
}); | |
System.SystemException = $d.declare("System.SystemException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function SystemException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_SystemException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function SystemException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function SystemException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.ArgumentException = $d.declare("System.ArgumentException", System.SystemException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Message", p.get_Message, 6], ["get_ParamName", p.get_ParamName, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$4", t.ctor$4, 6], ["ctor$3", t.ctor$3, 6]], [["Message", 20, 0], ["ParamName", 20, 1]]]; }; | |
$t.$ator = function() { | |
this.m_paramName = null; | |
}; | |
$t.ctor = function ArgumentException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_ArgumentException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ArgumentException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function ArgumentException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$4 = function ArgumentException(message, paramName, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
this.m_paramName = paramName; | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.ctor$3 = function ArgumentException(message, paramName) { | |
$t.$baseType.ctor$1.call(this, message); | |
this.m_paramName = paramName; | |
}; | |
$t.ctor$3.prototype = $p; | |
$p.get_Message = function ArgumentException_get_Message() { | |
var s = $t.$baseType.prototype.get_Message.call(this); | |
if (!String.IsNullOrEmpty(this.m_paramName)) { | |
var resourceString = System.Environment.GetResourceString$1("Arg_ParamName_Name", $d.array(System.Object, | |
[this.m_paramName])); | |
s += System.Environment().NewLine + resourceString; | |
} | |
return s; | |
}; | |
$p.get_ParamName = function ArgumentException_get_ParamName() { | |
return this.m_paramName; | |
}; | |
}); | |
System.ArgumentNullException = $d.declare("System.ArgumentNullException", System.ArgumentException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6]]]; }; | |
$t.ctor = function ArgumentNullException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("ArgumentNull_Generic")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ArgumentNullException(paramName) { | |
$t.$baseType.ctor$3.call(this, System.Environment.GetResourceString("ArgumentNull_Generic"), | |
paramName); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function ArgumentNullException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function ArgumentNullException(paramName, message) { | |
$t.$baseType.ctor$3.call(this, message, paramName); | |
}; | |
$t.ctor$3.prototype = $p; | |
}); | |
System.ArgumentOutOfRangeException = $d.declare("System.ArgumentOutOfRangeException", System.ArgumentException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Message", p.get_Message, 6], ["get_ActualValue", p.get_ActualValue, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$3", t.ctor$3, 6], ["ctor$2", t.ctor$2, 6], ["ctor$4", t.ctor$4, 6]], [["Message", 20, 0], ["ActualValue", 1, 1]]]; }; | |
$t.$ator = function() { | |
this.m_actualValue = null; | |
}; | |
$t.GetRangeMessage = function ArgumentOutOfRangeException_GetRangeMessage() { | |
return System.Environment.GetResourceString("Arg_ArgumentOutOfRangeException"); | |
}; | |
$t.ctor = function ArgumentOutOfRangeException() { | |
$t.$baseType.ctor$1.call(this, $t.GetRangeMessage()); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ArgumentOutOfRangeException(paramName) { | |
$t.$baseType.ctor$3.call(this, $t.GetRangeMessage(), paramName); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$3 = function ArgumentOutOfRangeException(paramName, message) { | |
$t.$baseType.ctor$3.call(this, message, paramName); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$2 = function ArgumentOutOfRangeException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$4 = function ArgumentOutOfRangeException(paramName, actualValue, message) { | |
$t.$baseType.ctor$3.call(this, message, paramName); | |
this.m_actualValue = actualValue; | |
}; | |
$t.ctor$4.prototype = $p; | |
$p.get_Message = function ArgumentOutOfRangeException_get_Message() { | |
var s = $t.$baseType.prototype.get_Message.call(this); | |
if (this.m_actualValue != null) { | |
var valueMessage = System.Environment.GetResourceString$1("ArgumentOutOfRange_ActualValue", | |
$d.array(System.Object, [this.m_actualValue.toString()])); | |
s += System.Environment().NewLine + valueMessage; | |
} | |
return s; | |
}; | |
$p.get_ActualValue = function ArgumentOutOfRangeException_get_ActualValue() { | |
return this.m_actualValue; | |
}; | |
}); | |
System.ArithmeticException = $d.declare("System.ArithmeticException", System.SystemException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function ArithmeticException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_ArithmeticException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ArithmeticException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function ArithmeticException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.Collections.IEnumerable = $d.declare("System.Collections.IEnumerable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetEnumerator", null, 6]]]; }; | |
}); | |
System.Collections.ICollection = $d.declare("System.Collections.ICollection", null, 66, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.IEnumerable]; | |
$t.$typeInfo = function(t, p) { return [161, null, [["CopyTo", null, 6]], null, [["Count", 45], ["SyncRoot", 1], ["IsSynchronized", 39]]]; }; | |
}); | |
System.Collections.IList = $d.declare("System.Collections.IList", null, 66, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.ICollection, System.Collections.IEnumerable]; | |
$t.$typeInfo = function(t, p) { return [161, null, [["Add", null, 6], ["Contains", null, 6], ["Clear", null, 6], ["IndexOf", null, 6], ["Insert", null, 6], ["Remove", null, 6], ["RemoveAt", null, 6]], null, [["this[]", 1, null, null, [["index", 45, 0]]], ["IsReadOnly", 39], ["IsFixedSize", 39]]]; }; | |
}); | |
System.Array = $d.declare("System.Array", System.Object, 23, $asm, function($t, $p) { | |
System.Object.$typeInit($t, $p); | |
$t.$intfs = [System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable]; | |
$t.$typeInfo = function(t, p) { return [129, null, [["GetEnumerator", p.GetEnumerator, 6], ["get_Count", p.get_Count, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["get_Rank", p.get_Rank, 6], ["BinarySearch", t.BinarySearch, 22], ["BinarySearch", t.BinarySearch$1, 22], ["BinarySearch", t.BinarySearch$2, 22], ["BinarySearch", t.BinarySearch$3, 22], ["InternalBinarySearch", t.InternalBinarySearch, 19], ["Copy", t.Copy, 22], ["Copy", t.Copy$2, 22], ["ConstrainedCopy", t.ConstrainedCopy, 22], ["Copy", t.Copy$1, 22], ["Copy", t.Copy$3, 22], ["CopyTo", p.CopyTo, 6], ["CopyTo", p.CopyTo$1, 6], ["ConvertAll", t.ConvertAll, 22], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["get_IsFixedSize", p.get_IsFixedSize, 6], ["get_IsTypedArray", p.get_IsTypedArray, 6], ["Clear", t.Clear, 22], ["Clone", p.Clone, 6], ["ConvertToUntyped", t.ConvertToUntyped, 22], ["Exists", t.Exists, 22], ["Find", t.Find, 22], ["FindAll", t.FindAll, 22], ["FindIndex", t.FindIndex, 22], ["FindIndex", t.FindIndex$1, 22], ["FindIndex", t.FindIndex$2, 22], ["FindLast", t.FindLast, 22], ["FindLastIndex", t.FindLastIndex, 22], ["FindLastIndex", t.FindLastIndex$1, 22], ["FindLastIndex", t.FindLastIndex$2, 22], ["ForEach", t.ForEach, 22], ["IndexOf", t.IndexOf, 22], ["IndexOf", t.IndexOf$1, 22], ["IndexOf", t.IndexOf$2, 22], ["IndexOf", t.IndexOf$3, 22], ["IndexOf", t.IndexOf$4, 22], ["IndexOf", t.IndexOf$5, 22], ["LastIndexOf", t.LastIndexOf, 22], ["LastIndexOf", t.LastIndexOf$1, 22], ["LastIndexOf", t.LastIndexOf$2, 22], ["LastIndexOf", t.LastIndexOf$3, 22], ["LastIndexOf", t.LastIndexOf$4, 22], ["LastIndexOf", t.LastIndexOf$5, 22], ["Resize", t.Resize, 22], ["TrueForAll", t.TrueForAll, 22], ["GetLength", p.GetLength, 6], ["GetUpperBound", p.GetUpperBound, 6], ["GetLowerBound", p.GetLowerBound, 6], ["CreateInstance", t.CreateInstance, 22], ["CreateInstance", t.CreateInstance$1, 22], ["GetValue", p.GetValue, 6], ["SetValue", p.SetValue, 6], ["GetValue", p.GetValue$1, 6], ["SetValue", p.SetValue$1, 6], ["Sort", t.Sort, 22], ["Sort", t.Sort$1, 22], ["Sort", t.Sort$4, 22], ["Sort", t.Sort$5, 22], ["Sort", t.Sort$2, 22], ["Sort", t.Sort$3, 22], ["Sort", t.Sort$6, 22], ["Sort", t.Sort$7, 22], ["Sort", t.Sort$8, 22], ["Sort", t.Sort$13, 22], ["Sort", t.Sort$11, 22], ["Sort", t.Sort$15, 22], ["Sort", t.Sort$9, 22], ["Sort", t.Sort$14, 22], ["Sort", t.Sort$12, 22], ["Sort", t.Sort$16, 22], ["Sort", t.Sort$10, 22], ["Reverse", t.Reverse, 22], ["Reverse", t.Reverse$1, 22]], [["ctor", t.ctor, 4]], [["Count", 45, 1], ["SyncRoot", 1, 2], ["IsSynchronized", 39, 3], ["Rank", 45, 4], ["IsReadOnly", 39, 18], ["IsFixedSize", 39, 19], ["IsTypedArray", 39, 20]]]; }; | |
$p.GetEnumerator = function Array_GetEnumerator() { | |
return new System.ArrayEnumerator.ctor(this); | |
}; | |
$p.get_Count = function Array_get_Count() { | |
return this.length; | |
}; | |
$p.get_SyncRoot = function Array_get_SyncRoot() { | |
return this; | |
}; | |
$p.get_IsSynchronized = function Array_get_IsSynchronized() { | |
return true; | |
}; | |
$p.get_Rank = function Array_get_Rank() { | |
return this.$ranks ? this.$ranks.length : 1; | |
}; | |
$t.BinarySearch = function Array_BinarySearch(T, array, value) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.BinarySearch$3(T, array, 0, array.length, value, null); | |
}; | |
$t.BinarySearch$1 = function Array_BinarySearch(T, array, value, comparer) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.BinarySearch$3(T, array, 0, array.length, value, comparer); | |
}; | |
$t.BinarySearch$2 = function Array_BinarySearch(T, array, index, length, value) { | |
return $t.BinarySearch$3(T, array, index, length, value, null); | |
}; | |
$t.BinarySearch$3 = function Array_BinarySearch(T, array, index, length, value, comparer) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (index < 0 || length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$1((index < 0 ? "index" : "length")); | |
if (array.length - index < length) | |
throw new System.ArgumentException.ctor$1("length"); | |
return $t.InternalBinarySearch(T, array, index, length, value, comparer || System.Collections.Generic.Comparer$1(T).get_Default()); | |
}; | |
$t.InternalBinarySearch = function Array_InternalBinarySearch(T, array, index, length, value, comparer) { | |
var lo = index; | |
var hi = index + length - 1; | |
while (lo <= hi) { | |
var i = lo + ((hi - lo) >> 1); | |
var order = comparer.System$Collections$Generic$IComparer$1$Compare(array[i], value); | |
if (order == 0) | |
return i; | |
if (order < 0) { | |
lo = i + 1; | |
} | |
else { | |
hi = i - 1; | |
} | |
} | |
return ~lo; | |
}; | |
$t.Copy = function Array_Copy(sourceArray, destinationArray, length) { | |
$t.Copy$2(sourceArray, sourceArray.GetLowerBound(0), destinationArray, destinationArray.GetLowerBound(0), | |
length); | |
}; | |
$t.Copy$2 = function Array_Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { | |
for (var i = sourceIndex, j = destinationIndex; i < sourceArray.length && j < destinationArray.length && i < sourceIndex + length; i++, j++) { | |
destinationArray[j] = sourceArray[i]; | |
} | |
}; | |
$t.ConstrainedCopy = function Array_ConstrainedCopy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { | |
$t.Copy$2(sourceArray, sourceIndex, destinationArray, destinationIndex, length); | |
}; | |
$t.Copy$1 = function Array_Copy(sourceArray, destinationArray, length) { | |
$t.Copy(sourceArray, destinationArray, (length | 0)); | |
}; | |
$t.Copy$3 = function Array_Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { | |
$t.Copy$2(sourceArray, (sourceIndex | 0), destinationArray, (destinationIndex | 0), (length | 0)); | |
}; | |
$p.CopyTo = function Array_CopyTo(array, index) { | |
$t.Copy$2(this, index, array, 0, array.length); | |
}; | |
$p.CopyTo$1 = function Array_CopyTo(array, index) { | |
this.CopyTo(array, index); | |
}; | |
$t.ConvertAll = function Array_ConvertAll(TInput, TOutput, array, converter) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (converter == null) { | |
throw new System.ArgumentNullException.ctor$1("converter"); | |
} | |
var array2 = $d.array(TOutput, array.length); | |
for (var i = 0; i < array.length; i++) { | |
array2[i] = converter(array[i]); | |
} | |
return array2; | |
}; | |
$p.get_IsReadOnly = function Array_get_IsReadOnly() { | |
return false; | |
}; | |
$p.get_IsFixedSize = function Array_get_IsFixedSize() { | |
return true; | |
}; | |
$p.get_IsTypedArray = function Array_get_IsTypedArray() { | |
return this.constructor != Array; | |
}; | |
$t.Clear = function Array_Clear(array, startIndex, length) { | |
for (var i = startIndex; i < startIndex + length; i++) { | |
array[i] = null; | |
} | |
}; | |
$p.System$Collections$IList$Add = function Array_System_Collections_IList_Add(value) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IList$Clear = function Array_System_Collections_IList_Clear() { | |
$t.Clear(this, 0, this.length); | |
}; | |
$p.System$Collections$IList$Contains = function Array_System_Collections_IList_Contains(value) { | |
return $t.IndexOf(this, value) >= 0; | |
}; | |
$p.System$Collections$IList$IndexOf = function Array_System_Collections_IList_IndexOf(value) { | |
return $t.IndexOf(this, value); | |
}; | |
$p.System$Collections$IList$Insert = function Array_System_Collections_IList_Insert(index, value) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IList$Remove = function Array_System_Collections_IList_Remove(value) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IList$RemoveAt = function Array_System_Collections_IList_RemoveAt(index) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IList$get_Item = function Array_System$Collections$IList$get_Item(index) { | |
return this[index]; | |
}; | |
$p.System$Collections$IList$set_Item = function Array_System$Collections$IList$set_Item(index, value) { | |
this[index] = value; | |
}; | |
$p.Clone = function Array_Clone() { | |
var array = (this.constructor != Array) ? new this.constructor(this) : this.slice(0); | |
var elementType = this.$type.$elementType; | |
return $d.array(elementType, array, this.$ranks); | |
}; | |
$t.ConvertToUntyped = function Array_ConvertToUntyped(array) { | |
if (array == null || array.constructor == Array) | |
return array; | |
var result = Array.prototype.slice.call(array); | |
result.$type = array.$type; | |
if (array.$ranks != null) | |
result.$ranks = array.$ranks; | |
return result; | |
}; | |
$t.Exists = function Array_Exists(T, array, match) { | |
return $t.FindIndex(T, array, match) != -1; | |
}; | |
$t.Find = function Array_Find(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
for (var i = 0; i < array.length; i++) { | |
if (match(array[i])) { | |
return array[i]; | |
} | |
} | |
return $d.default(T); | |
}; | |
$t.FindAll = function Array_FindAll(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
var list = new (System.Collections.Generic.List$1(T).ctor)(); | |
for (var i = 0; i < array.length; i++) { | |
if (match(array[i])) | |
list.Add(array[i]); | |
} | |
return list.ToArray(); | |
}; | |
$t.FindIndex = function Array_FindIndex(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.FindIndex$2(T, array, 0, array.length, match); | |
}; | |
$t.FindIndex$1 = function Array_FindIndex(T, array, startIndex, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.FindIndex$2(T, array, startIndex, array.length - startIndex, match); | |
}; | |
$t.FindIndex$2 = function Array_FindIndex(T, array, startIndex, count, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (startIndex < 0 || startIndex > array.length) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
} | |
if (count < 0 || startIndex > array.length - count) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
var endIndex = startIndex + count; | |
for (var i = startIndex; i < endIndex; i++) { | |
if (match(array[i])) | |
return i; | |
} | |
return -1; | |
}; | |
$t.FindLast = function Array_FindLast(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
for (var i = array.length - 1; i >= 0; i--) { | |
if (match(array[i])) { | |
return array[i]; | |
} | |
} | |
return $d.default(T); | |
}; | |
$t.FindLastIndex = function Array_FindLastIndex(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.FindLastIndex$2(T, array, array.length - 1, array.length, match); | |
}; | |
$t.FindLastIndex$1 = function Array_FindLastIndex(T, array, startIndex, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.FindLastIndex$2(T, array, startIndex, startIndex + 1, match); | |
}; | |
$t.FindLastIndex$2 = function Array_FindLastIndex(T, array, startIndex, count, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
if (array.length == 0) { | |
if (startIndex != -1) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
} | |
} | |
else { | |
if (startIndex < 0 || startIndex >= array.length) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
} | |
} | |
if (count < 0 || startIndex - count + 1 < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
} | |
var endIndex = startIndex - count; | |
for (var i = startIndex; i > endIndex; i--) { | |
if (match(array[i])) { | |
return i; | |
} | |
} | |
return -1; | |
}; | |
$t.ForEach = function Array_ForEach(T, array, action) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (action == null) { | |
throw new System.ArgumentNullException.ctor$1("action"); | |
} | |
for (var i = 0; i < array.length; i++) { | |
action(array[i]); | |
} | |
}; | |
$t.IndexOf = function Array_IndexOf(array, value) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.IndexOf$2(array, value, 0, array.length); | |
}; | |
$t.IndexOf$1 = function Array_IndexOf(array, value, startIndex) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.IndexOf$2(array, value, startIndex, array.length - startIndex); | |
}; | |
$t.IndexOf$2 = function Array_IndexOf(array, value, startIndex, count) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (array.get_Rank() != 1) | |
throw new System.Exception.ctor$1(System.Environment.GetResourceString("Rank_MultiDimNotSupported")); | |
if (startIndex < 0 || startIndex > array.length) | |
throw new System.ArgumentOutOfRangeException.ctor$3("startIndex", System.Environment.GetResourceString("ArgumentOutOfRange_Index")); | |
if (count < 0 || count > array.length - startIndex) | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", System.Environment.GetResourceString("ArgumentOutOfRange_Count")); | |
return System.Collections.Generic.EqualityComparer$1(System.Object).get_Default().IndexOf(array, | |
value, startIndex, count); | |
}; | |
$t.IndexOf$3 = function Array_IndexOf(T, array, value) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.IndexOf$5(T, array, value, 0, array.length); | |
}; | |
$t.IndexOf$4 = function Array_IndexOf(T, array, value, startIndex) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.IndexOf$5(T, array, value, startIndex, array.length - startIndex); | |
}; | |
$t.IndexOf$5 = function Array_IndexOf(T, array, value, startIndex, count) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (startIndex < 0 || (startIndex >= array.length && array.length > 0)) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("startIndex", "out of range"); | |
} | |
if (count < 0 || count > array.length - startIndex) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", "out of range"); | |
} | |
return System.Collections.Generic.EqualityComparer$1(T).get_Default().IndexOf(array, value, startIndex, | |
count); | |
}; | |
$t.LastIndexOf = function Array_LastIndexOf(array, value) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.LastIndexOf$2(array, value, array.length - 1, array.length); | |
}; | |
$t.LastIndexOf$1 = function Array_LastIndexOf(array, value, startIndex) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
return $t.LastIndexOf$2(array, value, startIndex, startIndex + 1); | |
}; | |
$t.LastIndexOf$2 = function Array_LastIndexOf(array, value, startIndex, count) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (array.length == 0) | |
return -1; | |
if (startIndex < 0 || startIndex >= array.length) | |
throw new System.ArgumentOutOfRangeException.ctor$3("startIndex", System.Environment.GetResourceString("ArgumentOutOfRange_Index")); | |
if (count < 0 || startIndex - count + 1 < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", System.Environment.GetResourceString("ArgumentOutOfRange_Count")); | |
if (array.get_Rank() != 1) | |
throw new System.Exception.ctor$1(System.Environment.GetResourceString("Rank_MultiDimNotSupported")); | |
return System.Collections.Generic.EqualityComparer$1(System.Object).get_Default().LastIndexOf(array, | |
value, startIndex, count); | |
}; | |
$t.LastIndexOf$3 = function Array_LastIndexOf(T, array, value) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.LastIndexOf$5(T, array, value, array.length - 1, array.length); | |
}; | |
$t.LastIndexOf$4 = function Array_LastIndexOf(T, array, value, startIndex) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
return $t.LastIndexOf$5(T, array, value, startIndex, (array.length == 0) ? 0 : (startIndex + 1)); | |
}; | |
$t.LastIndexOf$5 = function Array_LastIndexOf(T, array, value, startIndex, count) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (startIndex < 0 || (startIndex >= array.length && array.length > 0)) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("startIndex", "out of range"); | |
} | |
if (count < 0 || startIndex - count + 1 < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", "out of range"); | |
} | |
return System.Collections.Generic.EqualityComparer$1(T).get_Default().LastIndexOf(array, value, | |
startIndex, count); | |
}; | |
$t.Resize = function Array_Resize(T, array, newSize) { | |
if (newSize < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("newSize", "must be non negative"); | |
} | |
var larray = array.value; | |
if (larray == null) { | |
array.value = $d.array(T, newSize); | |
return; | |
} | |
if (larray.length != newSize) { | |
var newArray = $t.CreateInstance$1(T, newSize, !array.value.get_IsTypedArray()); | |
$t.Copy$2(larray, 0, newArray, 0, larray.length > newSize ? newSize : larray.length); | |
array.value = newArray; | |
} | |
}; | |
$t.TrueForAll = function Array_TrueForAll(T, array, match) { | |
if (array == null) { | |
throw new System.ArgumentNullException.ctor$1("array"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
for (var i = 0; i < array.length; i++) { | |
if (!match(array[i])) { | |
return false; | |
} | |
} | |
return true; | |
}; | |
$p.GetLength = function Array_GetLength(dimension) { | |
var rank = this.$ranks ? this.$ranks.length : 1; | |
if (dimension < 0 || dimension >= rank) | |
throw new System.IndexOutOfRangeException.ctor(); | |
return this.$ranks ? this.$ranks[dimension] : this.length; | |
}; | |
$p.GetUpperBound = function Array_GetUpperBound(dimension) { | |
return this.GetLength(dimension) - 1; | |
}; | |
$p.GetLowerBound = function Array_GetLowerBound(dimension) { | |
this.GetLength(dimension); | |
return 0; | |
}; | |
$t.CreateInstance = function Array_CreateInstance(elementType, length, forceUntyped) { | |
if (elementType == null) | |
throw new System.ArgumentNullException.ctor$1("elementType"); | |
if (length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("length", "ArgumentOutOfRange_NeedNonNegNum"); | |
return $d.array(elementType.self, length, null, forceUntyped); | |
}; | |
$t.CreateInstance$1 = function Array_CreateInstance(T, length, forceUntyped) { | |
if (length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("length", "ArgumentOutOfRange_NeedNonNegNum"); | |
return $d.array(T, length, null, forceUntyped); | |
}; | |
$p.GetValue = function Array_GetValue(index) { | |
return this[index]; | |
}; | |
$p.SetValue = function Array_SetValue(value, index) { | |
this[index] = value; | |
}; | |
$p.GetValue$1 = function Array_GetValue(index) { | |
return this[index]; | |
}; | |
$p.SetValue$1 = function Array_SetValue(value, index) { | |
this[index] = value; | |
}; | |
$t.SwapIfGreater = function Array_SwapIfGreater(keys, values, comparer, a, b) { | |
if (a != b) { | |
var ka = keys[a]; | |
var kb = keys[b]; | |
if (comparer.System$Collections$Generic$IComparer$1$Compare(ka, kb) > 0) { | |
keys[a] = kb; | |
keys[b] = ka; | |
if (values != null) { | |
var value = values[a]; | |
values[a] = values[b]; | |
values[b] = value; | |
} | |
} | |
} | |
}; | |
$t.QuickSort = function Array_QuickSort(T, keys, values, left, right, comparer) { | |
if (comparer == null) | |
comparer = System.Collections.Generic.Comparer$1(T).get_Default(); | |
if (left >= right) { | |
return; | |
} | |
if (right == left + 1) { | |
$t.SwapIfGreater(keys, values, comparer, left, right); | |
return; | |
} | |
if (right == left + 2) { | |
var middle = left + 1; | |
$t.SwapIfGreater(keys, values, comparer, left, middle); | |
$t.SwapIfGreater(keys, values, comparer, left, right); | |
$t.SwapIfGreater(keys, values, comparer, middle, right); | |
return; | |
} | |
do { | |
var i = left; | |
var j = right; | |
var middle = i + ((j - i) / 2 | 0); | |
$t.SwapIfGreater(keys, values, comparer, i, middle); | |
$t.SwapIfGreater(keys, values, comparer, i, j); | |
$t.SwapIfGreater(keys, values, comparer, middle, j); | |
var x = keys[middle]; | |
do { | |
while (comparer.System$Collections$Generic$IComparer$1$Compare(keys[i], x) < 0) { | |
i++; | |
} | |
while (comparer.System$Collections$Generic$IComparer$1$Compare(x, keys[j]) < 0) { | |
j--; | |
} | |
if (i < left || j > right) { | |
throw new System.Exception.ctor$1("(i>=left && j<=right) Sort failed - Is your IComparer bogus?"); | |
} | |
if (i > j) | |
break; | |
if (i < j) { | |
var key = keys[i]; | |
keys[i] = keys[j]; | |
keys[j] = key; | |
if (values != null) { | |
var value = values[i]; | |
values[i] = values[j]; | |
values[j] = value; | |
} | |
} | |
i++; | |
j--; | |
} | |
while (i <= j); | |
if (j - left <= right - i) { | |
if (left < j) | |
$t.QuickSort(T, keys, values, left, j, comparer); | |
left = i; | |
} | |
else { | |
if (i < right) | |
$t.QuickSort(T, keys, values, i, right, comparer); | |
right = j; | |
} | |
} | |
while (left < right); | |
}; | |
$t.TryNativeSort = function Array_TryNativeSort(array) { | |
var tk = array.$type ? array.$type.$elementType.$typeKind : 0; | |
var isPrimitive = (tk >= 39 && tk <= 51) || (tk == 53) || (tk == 54); | |
if (isPrimitive) | |
Array.prototype.sort.call(array); | |
return isPrimitive; | |
}; | |
$t.Sort = function Array_Sort(array) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
$t.Sort$7(array, null, array.GetLowerBound(0), array.length, null); | |
}; | |
$t.Sort$1 = function Array_Sort(keys, items) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
$t.Sort$7(keys, items, keys.GetLowerBound(0), keys.length, null); | |
}; | |
$t.Sort$4 = function Array_Sort(array, index, length) { | |
$t.Sort$7(array, null, index, length, null); | |
}; | |
$t.Sort$5 = function Array_Sort(keys, items, index, length) { | |
$t.Sort$7(keys, items, index, length, null); | |
}; | |
$t.Sort$2 = function Array_Sort(array, comparer) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
$t.Sort$7(array, null, array.GetLowerBound(0), array.length, comparer); | |
}; | |
$t.Sort$3 = function Array_Sort(keys, items, comparer) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
$t.Sort$7(keys, items, keys.GetLowerBound(0), keys.length, comparer); | |
}; | |
$t.Sort$6 = function Array_Sort(array, index, length, comparer) { | |
$t.Sort$7(array, null, index, length, comparer); | |
}; | |
$t.Sort$7 = function Array_Sort(keys, items, index, length, comparer) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
if (keys.get_Rank() != 1 || (items != null && items.get_Rank() != 1)) | |
throw new System.ArgumentException.ctor$1("Rank_MultiDimNotSupported"); | |
if (items != null && keys.GetLowerBound(0) != items.GetLowerBound(0)) | |
throw new System.ArgumentException.ctor$1("Arg_LowerBoundsMustMatch"); | |
if (index < keys.GetLowerBound(0) || length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3((length < 0 ? "length" : "index"), "ArgumentOutOfRange_NeedNonNegNum"); | |
if (keys.length - (index - keys.GetLowerBound(0)) < length || (items != null && (index - items.GetLowerBound(0)) > items.length - length)) | |
throw new System.ArgumentException.ctor$1("Argument_InvalidOffLen"); | |
if (length > 1) { | |
if (items == null && index == 0 && length == keys.length && comparer == null && $t.TryNativeSort(keys)) | |
return; | |
var comparerT = (comparer != null) ? new System.Collections.Generic.ComparerComparer.ctor(comparer) : null; | |
$t.QuickSort(System.Object, keys, items, index, index + length - 1, comparerT); | |
} | |
}; | |
$t.Sort$8 = function Array_Sort(T, array) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
$t.Sort$12(T, array, array.GetLowerBound(0), array.length, null); | |
}; | |
$t.Sort$13 = function Array_Sort(TKey, TValue, keys, items) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
$t.Sort$16(TKey, TValue, keys, items, 0, keys.length, null); | |
}; | |
$t.Sort$11 = function Array_Sort(T, array, index, length) { | |
$t.Sort$12(T, array, index, length, null); | |
}; | |
$t.Sort$15 = function Array_Sort(TKey, TValue, keys, items, index, length) { | |
$t.Sort$16(TKey, TValue, keys, items, index, length, null); | |
}; | |
$t.Sort$9 = function Array_Sort(T, array, comparer) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
$t.Sort$12(T, array, 0, array.length, comparer); | |
}; | |
$t.Sort$14 = function Array_Sort(TKey, TValue, keys, items, comparer) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
$t.Sort$16(TKey, TValue, keys, items, 0, keys.length, comparer); | |
}; | |
$t.Sort$12 = function Array_Sort(T, array, index, length, comparer) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (index < 0 || length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3((length < 0 ? "length" : "index"), "ArgumentOutOfRange_NeedNonNegNum"); | |
if (array.length - index < length) | |
throw new System.ArgumentException.ctor$1("Argument_InvalidOffLen"); | |
if (length > 1) { | |
if (index == 0 && length == array.length && comparer == null && $t.TryNativeSort(array)) | |
return; | |
$t.QuickSort(T, array, null, index, index + length - 1, comparer); | |
} | |
}; | |
$t.Sort$16 = function Array_Sort(TKey, TValue, keys, items, index, length, comparer) { | |
if (keys == null) | |
throw new System.ArgumentNullException.ctor$1("keys"); | |
if (index < 0 || length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3((length < 0 ? "length" : "index"), "ArgumentOutOfRange_NeedNonNegNum"); | |
if (keys.length - index < length || (items != null && index > items.length - length)) | |
throw new System.ArgumentException.ctor$1("Argument_InvalidOffLen"); | |
if (length > 1) { | |
if (items == null && index == 0 && length == keys.length && comparer == null && $t.TryNativeSort(keys)) | |
return; | |
$t.QuickSort(TKey, keys, items, index, index + length - 1, comparer); | |
} | |
}; | |
$t.Sort$10 = function Array_Sort(T, array, comparison) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (comparison == null) | |
throw new System.ArgumentNullException.ctor$1("comparison"); | |
Array.prototype.sort.call(array, comparison); | |
}; | |
$t.Reverse = function Array_Reverse(array) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
$t.Reverse$1(array, array.GetLowerBound(0), array.length); | |
}; | |
$t.Reverse$1 = function Array_Reverse(array, index, length) { | |
if (array == null) | |
throw new System.ArgumentNullException.ctor$1("array"); | |
if (index < array.GetLowerBound(0) || length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3((index < 0 ? "index" : "length"), System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (array.length - (index - array.GetLowerBound(0)) < length) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_InvalidOffLen")); | |
if (array.get_Rank() != 1) | |
throw new System.Exception.ctor$1("Rank_MultiDimNotSupported"); | |
var i = index; | |
var j = index + length - 1; | |
while (i < j) { | |
var temp = array[i]; | |
array[i] = array[j]; | |
array[j] = temp; | |
i++; | |
j--; | |
} | |
}; | |
$p.System$Collections$IList$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$IList$get_IsFixedSize = $p.get_IsFixedSize; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$ICollection$get_SyncRoot = $p.get_SyncRoot; | |
$p.System$Collections$ICollection$get_IsSynchronized = $p.get_IsSynchronized; | |
$p.System$Collections$ICollection$CopyTo = $p.CopyTo; | |
$p.System$Collections$IEnumerable$GetEnumerator = $p.GetEnumerator; | |
}, null, null, Array); | |
System.Collections.Generic.IEnumerable$1 = $d.declare("System.Collections.Generic.IEnumerable`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = [System.Collections.IEnumerable]; | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetEnumerator", null, 6]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.IReadOnlyCollection$1 = $d.declare("System.Collections.Generic.IReadOnlyCollection`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, null, null, [["Count", 45]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.IReadOnlyList$1 = $d.declare("System.Collections.Generic.IReadOnlyList`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IReadOnlyCollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, null, null, [["this[]", T, null, null, [["index", 45, 0]]]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.ICollection$1 = $d.declare("System.Collections.Generic.ICollection`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["Add", null, 6], ["Clear", null, 6], ["Contains", null, 6], ["CopyTo", null, 6], ["Remove", null, 6]], null, [["Count", 45], ["IsReadOnly", 39]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.IList$1 = $d.declare("System.Collections.Generic.IList`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.ICollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["IndexOf", null, 6], ["Insert", null, 6], ["RemoveAt", null, 6]], null, [["this[]", T, null, null, [["index", 45, 0]]]]]; }; | |
}, ["T"]); | |
System.Array$1 = $d.declare("System.Array`1", Array, 279, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IList, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList$1(T), System.Collections.Generic.IReadOnlyCollection$1(T), System.Collections.Generic.IList$1(T), System.Collections.Generic.ICollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [256]; }; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = function Array$1_System_Collections_Generic_IEnumerable$T$_GetEnumerator() { | |
var T = this.$type.$elementType; | |
return new (System.ArrayEnumerator$1(T).ctor)(this); | |
}; | |
$p.System$Collections$Generic$IReadOnlyList$1$get_Item = function Array$1_System$Collections$Generic$IReadOnlyList$1$get_Item(index) { | |
return this[index]; | |
}; | |
$p.System$Collections$Generic$ICollection$1$get_Count = function Array$1_System$Collections$Generic$ICollection$1$get_Count() { | |
return this.length; | |
}; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = function Array$1_System$Collections$Generic$ICollection$1$get_IsReadOnly() { | |
return true; | |
}; | |
$p.System$Collections$Generic$ICollection$1$Add = function Array$1_System_Collections_Generic_ICollection$T$_Add(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Clear = function Array$1_System_Collections_Generic_ICollection$T$_Clear() { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Contains = function Array$1_System_Collections_Generic_ICollection$T$_Contains(item) { | |
var T = this.$type.$elementType; | |
return Array.IndexOf$3(T, this, item) != -1; | |
}; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = function Array$1_System_Collections_Generic_ICollection$T$_CopyTo(array, arrayIndex) { | |
$t.$baseType.prototype.CopyTo.call(this, array, arrayIndex); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Remove = function Array$1_System_Collections_Generic_ICollection$T$_Remove(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$IList$1$get_Item = function Array$1_System$Collections$Generic$IList$1$get_Item(index) { | |
return this[index]; | |
}; | |
$p.System$Collections$Generic$IList$1$set_Item = function Array$1_System$Collections$Generic$IList$1$set_Item(index, value) { | |
this[index] = value; | |
}; | |
$p.System$Collections$Generic$IList$1$IndexOf = function Array$1_System_Collections_Generic_IList$T$_IndexOf(item) { | |
var T = this.$type.$elementType; | |
return Array.IndexOf$3(T, this, item); | |
}; | |
$p.System$Collections$Generic$IList$1$Insert = function Array$1_System_Collections_Generic_IList$T$_Insert(index, item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$IList$1$RemoveAt = function Array$1_System_Collections_Generic_IList$T$_RemoveAt(index) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$IReadOnlyCollection$1$get_Count = $p.get_Count; | |
}, ["T"]); | |
System.IDisposable = $d.declare("System.IDisposable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Dispose", null, 6]]]; }; | |
}); | |
System.Collections.IEnumerator = $d.declare("System.Collections.IEnumerator", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["MoveNext", null, 6], ["Reset", null, 6]], null, [["Current", 1]]]; }; | |
}); | |
System.Collections.Generic.IEnumerator$1 = $d.declare("System.Collections.Generic.IEnumerator`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = [System.IDisposable, System.Collections.IEnumerator]; | |
$t.$typeInfo = function(t, p) { return [161, null, null, null, [["Current", T]]]; }; | |
}, ["T"]); | |
System.ArrayEnumerator$1 = $d.declare("System.ArrayEnumerator`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerator$1(T), System.IDisposable, System.Collections.IEnumerator]; }; | |
$t.$typeInfo = function(t, p) { return [256, null, [["get_Current", p.get_Current, 6], ["MoveNext", p.MoveNext, 6], ["Dispose", p.Dispose, 6], ["Reset", p.Reset, 6]], [["ctor", t.ctor, 6]], [["Current", T, 0]]]; }; | |
$t.$ator = function() { | |
this.array = null; | |
this.index = -1; | |
}; | |
$t.ctor = function ArrayEnumerator$1(array) { | |
$t.$baseType.ctor.call(this); | |
this.array = array; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Current = function ArrayEnumerator$1_get_Current() { | |
return this.array[this.index]; | |
}; | |
$p.System$Collections$IEnumerator$get_Current = function ArrayEnumerator$1_System$Collections$IEnumerator$get_Current() { | |
return this.get_Current(); | |
}; | |
$p.MoveNext = function ArrayEnumerator$1_MoveNext() { | |
this.index++; | |
return this.index < this.array.length; | |
}; | |
$p.Dispose = function ArrayEnumerator$1_Dispose() {}; | |
$p.Reset = function ArrayEnumerator$1_Reset() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$Generic$IEnumerator$1$get_Current = $p.get_Current; | |
$p.System$IDisposable$Dispose = $p.Dispose; | |
$p.System$Collections$IEnumerator$MoveNext = $p.MoveNext; | |
$p.System$Collections$IEnumerator$Reset = $p.Reset; | |
}, ["T"]); | |
System.ArrayEnumerator = $d.declare("System.ArrayEnumerator", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.IEnumerator]; | |
$t.$typeInfo = function(t, p) { return [256, null, [["get_Current", p.get_Current, 6], ["MoveNext", p.MoveNext, 6], ["Dispose", p.Dispose, 6], ["Reset", p.Reset, 6]], [["ctor", t.ctor, 6]], [["Current", 1, 0]]]; }; | |
$t.$ator = function() { | |
this.array = null; | |
this.index = -1; | |
}; | |
$t.ctor = function ArrayEnumerator(array) { | |
$t.$baseType.ctor.call(this); | |
this.array = array; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Current = function ArrayEnumerator_get_Current() { | |
return this.array[this.index]; | |
}; | |
$p.System$Collections$IEnumerator$get_Current = function ArrayEnumerator_System$Collections$IEnumerator$get_Current() { | |
return this.get_Current(); | |
}; | |
$p.MoveNext = function ArrayEnumerator_MoveNext() { | |
this.index++; | |
return this.index < this.array.length; | |
}; | |
$p.Dispose = function ArrayEnumerator_Dispose() {}; | |
$p.Reset = function ArrayEnumerator_Reset() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IEnumerator$MoveNext = $p.MoveNext; | |
$p.System$Collections$IEnumerator$Reset = $p.Reset; | |
}); | |
System.Attribute = $d.declare("System.Attribute", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, [["EmptyAttributes", $d.arrayType(System.Attribute), 51]], [["IsDefined", t.IsDefined, 22], ["IsDefined", t.IsDefined$1, 22]], [["ctor", t.ctor, 4]], null, null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(32767);$obj.set_AllowMultiple(false);$obj.set_Inherited(true);return $obj; }).call(this)]]; }; | |
$t.cctor = function() { | |
$t.EmptyAttributes = $d.array(System.Attribute, 0); | |
}; | |
$t.ctor = function Attribute() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.IsDefined = function Attribute_IsDefined(element, attributeType) { | |
return $t.IsDefined$1(element, attributeType, true); | |
}; | |
$t.IsDefined$1 = function Attribute_IsDefined(element, attributeType, inherit) { | |
if (element == null) | |
throw new System.ArgumentNullException.ctor$1("element"); | |
if (attributeType == null) | |
throw new System.ArgumentNullException.ctor$1("attributeType"); | |
if (!$d.typeOf(System.Attribute).IsAssignableFrom(attributeType)) | |
throw new System.ArgumentException.ctor$1("Argument must subclass Attribute"); | |
return System.Linq.Enumerable.Any(System.Object, element.GetCustomAttributes$1(attributeType, | |
inherit)); | |
}; | |
}); | |
System.IComparable = $d.declare("System.IComparable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["CompareTo", null, 6]]]; }; | |
}); | |
System.ValueType = $d.declare("System.ValueType", System.Object, 5, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, null, [["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6]], [["ctor", t.ctor, 4]]]; }; | |
$t.ctor = $t.$baseType.ctor; | |
$p.Equals = function ValueType_Equals(other) { | |
if (this === other) | |
return true; | |
if (other == null || this.constructor != other.constructor) | |
return false; | |
var p1 = Object.keys(this); | |
var p2 = Object.keys(other); | |
if (p1.length != p2.length) | |
return false; | |
for (var i = 0; i < p1.length; ++i) { | |
if (p1[i] != p2[i] || !$d.equals(this[p1[i]], other[p1[i]])) | |
return false; | |
} | |
return true; | |
}; | |
$p.GetHashCode = function ValueType_GetHashCode() { | |
var hash = 17; | |
var p = Object.keys(this); | |
if (p.length > 0) | |
hash = (hash * 37 + $d.getHashCode(this[p[0]])) | 0; | |
if (p.length > 1) | |
hash = (hash * 37 + $d.getHashCode(this[p[1]])) | 0; | |
return hash; | |
}; | |
}); | |
System.Enum = $d.declare("System.Enum", System.ValueType, 2, $asm, function($t, $p) { | |
$t.$intfs = [System.IComparable]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["valueOf", p.valueOf, 3], ["CompareTo", p.CompareTo, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["GetTypeCode", p.GetTypeCode, 6], ["HasFlag", p.HasFlag, 6], ["ToString", p.ToString, 6], ["Parse", t.Parse, 22], ["Parse", t.Parse$1, 22], ["TryParse", t.TryParse, 22], ["TryParse", t.TryParse$1, 22], ["ToObject", t.ToObject, 22], ["GetNames", t.GetNames, 22], ["GetValues", t.GetValues, 22], ["GetUnderlyingType", t.GetUnderlyingType, 22]], [["ctor", t.ctor, 3]]]; }; | |
$t.$ator = function() { | |
this.value = null; | |
}; | |
$t.ctor = function Enum(type, value) { | |
$t.$baseType.ctor.call(this); | |
this.constructor = type; | |
this.value = value; | |
}; | |
$t.ctor.prototype = $p; | |
$p.valueOf = function Enum_valueOf() { | |
return this.value; | |
}; | |
$p.CompareTo = function Enum_CompareTo(target) { | |
if (target == null) | |
throw new System.ArgumentNullException.ctor$1("target"); | |
var targetType = $d.getTypeFuncFromInst(target); | |
if (targetType == Number) { | |
return $d.sign(this.value - target); | |
} | |
else | |
if (targetType == this.constructor) { | |
return $d.sign(this.value - target.value); | |
} | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_EnumAndObjectMustBeSameType")); | |
}; | |
$p.Equals = function Enum_Equals(target) { | |
if (target == null) | |
return false; | |
var targetType = $d.getTypeFuncFromInst(target); | |
return (targetType == Number && this.value == target) || (targetType == this.constructor && this.value == target.value); | |
}; | |
$p.GetHashCode = function Enum_GetHashCode() { | |
return this.value; | |
}; | |
$p.GetTypeCode = function Enum_GetTypeCode() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.HasFlag = function Enum_HasFlag(flag) { | |
var flagType = $d.getTypeFuncFromInst(flag); | |
if (flagType == Number) | |
return (this.value & flag) != 0; | |
else | |
if (flagType == this.constructor) | |
return (this.value & flag.value) != 0; | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_EnumTypeDoesNotMatch")); | |
}; | |
$p.ToString = function Enum_ToString() { | |
var type = this.constructor; | |
var index = $d.binarySearch(type.$enumValues, this.value); | |
return (index > -1) ? type.$enumNames[index] : this.value.toString(); | |
}; | |
$t.Parse = function Enum_Parse(enumType, value) { | |
return $t.Parse$1(enumType, value, false); | |
}; | |
$t.Parse$1 = function Enum_Parse(enumType, value, ignoreCase) { | |
var parseResult = $t.TryParseEnum(enumType, value, ignoreCase); | |
if (parseResult.constructor == enumType.self) | |
return parseResult; | |
else | |
throw new System.ArgumentException.ctor$1("enum parse error (" + parseResult + ")"); | |
}; | |
$t.TryParse = function Enum_TryParse(TEnum, value, result) { | |
return $t.TryParse$1(TEnum, value, false, result); | |
}; | |
$t.TryParse$1 = function Enum_TryParse(TEnum, value, ignoreCase, result) { | |
result.value = $d.default(TEnum); | |
var parseResult = $t.TryParseEnum($d.typeOf(TEnum), value, ignoreCase); | |
if (parseResult.constructor == TEnum) { | |
result.value = parseResult; | |
return true; | |
} | |
else | |
return false; | |
}; | |
$t.TryParseEnum = function Enum_TryParseEnum(enumType, value, ignoreCase) { | |
if (enumType == null) | |
throw new System.ArgumentNullException.ctor$1("enumType"); | |
if (!enumType.get_IsEnum()) | |
throw new System.ArgumentException.ctor$3(System.Environment.GetResourceString("Arg_MustBeEnum"), | |
"enumType"); | |
if (value == null) | |
return -1; | |
value = value.trim(); | |
if (value.length == 0) | |
return -2; | |
if (System.Char.IsDigit(value.get_Chars(0)) || value.get_Chars(0) == 45 /*'-'*/ || value.get_Chars(0) == 43 /*'+'*/) { | |
var n = parseInt(value); | |
if (isNaN(n)) | |
return -3; | |
else | |
return $t.ToObject(Number, enumType, n); | |
} | |
var values = value.Split($d.array(System.Char, [44 /*','*/])); | |
var result = 0; | |
var enumNames = enumType.self.$enumNames; | |
var enumValues = enumType.self.$enumValues; | |
for (var i = 0; i < values.length; i++) { | |
values[i] = values[i].trim(); | |
var success = false; | |
for (var j = 0; j < enumNames.length; j++) { | |
if ((ignoreCase && String.Compare$1(enumNames[j], values[i], 5) != 0) || (!ignoreCase && enumNames[j] != values[i])) | |
continue; | |
result |= enumValues[j]; | |
success = true; | |
break; | |
} | |
if (!success) | |
return -4; | |
} | |
return $t.ToObject(Number, enumType, result); | |
}; | |
$t.ToObject = function Enum_ToObject(T, enumType, value) { | |
if (enumType == null) | |
throw new System.ArgumentNullException.ctor$1("enumType"); | |
if (!enumType.get_IsEnum()) | |
throw new System.ArgumentException.ctor$3(System.Environment.GetResourceString("Arg_MustBeEnum"), | |
"enumType"); | |
return $d.boxEnum(enumType.self, value); | |
}; | |
$t.GetNames = function Enum_GetNames(enumType) { | |
if (enumType == null) | |
throw new System.ArgumentNullException.ctor$1("enumType"); | |
if (!enumType.get_IsEnum()) | |
throw new System.ArgumentException.ctor$3(System.Environment.GetResourceString("Arg_MustBeEnum"), | |
"enumType"); | |
return $d.array(String, enumType.self.$enumNames.slice()); | |
}; | |
$t.GetValues = function Enum_GetValues(enumType) { | |
if (enumType == null) | |
throw new System.ArgumentNullException.ctor$1("enumType"); | |
if (!enumType.get_IsEnum()) | |
throw new System.ArgumentException.ctor$3(System.Environment.GetResourceString("Arg_MustBeEnum"), | |
"enumType"); | |
var typeFunc = enumType.self; | |
var underlyingType = $d.tryDecodeTypeFunc(typeFunc.$underlyingType); | |
return $d.array(underlyingType, typeFunc.$enumValues); | |
}; | |
$t.GetUnderlyingType = function Enum_GetUnderlyingType(enumType) { | |
if (enumType == null) | |
throw new System.ArgumentNullException.ctor$1("enumType"); | |
return enumType.GetEnumUnderlyingType(); | |
}; | |
$p.System$IComparable$CompareTo = $p.CompareTo; | |
}); | |
System.AttributeTargets = $d.declareEnum("System.AttributeTargets", 45, $asm, 289, ["Assembly", "Module", "Class", "Struct", "Enum", "Constructor", "Method", "Property", "Field", "Event", "Interface", "Parameter", "Delegate", "ReturnValue", "GenericParameter", "All"], [0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x7FFF]); | |
System.AttributeUsageAttribute = $d.declare("System.AttributeUsageAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_ValidOn", p.get_ValidOn, 6], ["get_AllowMultiple", p.get_AllowMultiple, 6], ["set_AllowMultiple", p.set_AllowMultiple, 6], ["get_Inherited", p.get_Inherited, 6], ["set_Inherited", p.set_Inherited, 6]], [["ctor", t.ctor, 6]], [["ValidOn", System.AttributeTargets, 0], ["AllowMultiple", 39, 1, 2], ["Inherited", 39, 3, 4]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(4);$obj.set_Inherited(true);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.ValidOn = 0; | |
this.AllowMultiple = false; | |
this.Inherited = false; | |
}; | |
$t.ctor = function AttributeUsageAttribute(validOn) { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_ValidOn = function AttributeUsageAttribute_get_ValidOn() { return this.ValidOn; }; | |
$p.set_ValidOn = function AttributeUsageAttribute_set_ValidOn(value) { this.ValidOn = value;return value; }; | |
$p.get_AllowMultiple = function AttributeUsageAttribute_get_AllowMultiple() { return this.AllowMultiple; }; | |
$p.set_AllowMultiple = function AttributeUsageAttribute_set_AllowMultiple(value) { this.AllowMultiple = value;return value; }; | |
$p.get_Inherited = function AttributeUsageAttribute_get_Inherited() { return this.Inherited; }; | |
$p.set_Inherited = function AttributeUsageAttribute_set_Inherited(value) { this.Inherited = value;return value; }; | |
}); | |
System.IComparable$1 = $d.declare("System.IComparable`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["CompareTo", null, 6]]]; }; | |
}, ["T"]); | |
System.IEquatable$1 = $d.declare("System.IEquatable`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Equals", null, 6]]]; }; | |
}, ["T"]); | |
System.Boolean = $d.declare("System.Boolean", null, 39, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(Boolean), System.IEquatable$1(Boolean)]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["TrueLiteral", 20, 83, "true"], ["FalseLiteral", 20, 83, "false"], ["TrueString", 20, 54], ["FalseString", 20, 54]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22], ["ToString", p.ToString, 6], ["ToString", p.ToString$1, 6], ["CompareTo", p.CompareTo, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.TrueLiteral = "true"; | |
$t.FalseLiteral = "false"; | |
$t.TrueString = $t.TrueLiteral; | |
$t.FalseString = $t.FalseLiteral; | |
$t.Parse = function Boolean_Parse(value) { | |
if (value == null) | |
throw new System.ArgumentNullException.ctor$1("value"); | |
var result = { value: false }; | |
if (!$t.TryParse(value, result)) | |
throw new System.FormatException.ctor$1("Format_BadBoolean"); | |
return result.value; | |
}; | |
$t.TryParse = function Boolean_TryParse(value, result) { | |
result.value = false; | |
if (value == null) | |
return false; | |
if ($t.TrueLiteral.Equals$2(value, 5)) { | |
result.value = true; | |
return true; | |
} | |
if ($t.FalseLiteral.Equals$2(value, 5)) { | |
result.value = false; | |
return true; | |
} | |
value = value.trim(); | |
if ($t.TrueLiteral.Equals$2(value, 5)) { | |
result.value = true; | |
return true; | |
} | |
if ($t.FalseLiteral.Equals$2(value, 5)) { | |
result.value = false; | |
return true; | |
} | |
return false; | |
}; | |
$p.ToString = function Boolean_ToString() { | |
return this ? $t.TrueLiteral : $t.FalseLiteral; | |
}; | |
$p.ToString$1 = function Boolean_ToString(provider) { | |
return this ? $t.TrueLiteral : $t.FalseLiteral; | |
}; | |
$p.CompareTo = function Boolean_CompareTo(obj) { | |
if (this == obj) | |
return 0; | |
if (!this) | |
return -1; | |
return 1; | |
}; | |
$p.Equals = function Boolean_Equals(obj) { | |
return (this === obj); | |
}; | |
$p.GetHashCode = function Boolean_GetHashCode() { return this ? 1 : 0; }; | |
$p.System$IComparable$CompareTo = $p.CompareTo; | |
$p.System$IComparable$1$CompareTo = $p.CompareTo; | |
$p.System$IEquatable$1$Equals = $p.Equals; | |
}, null, null, Boolean); | |
System.IFormattable = $d.declare("System.IFormattable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["ToString", null, 6]]]; }; | |
}); | |
System.Byte = $d.declare("System.Byte", Number, 42, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Byte), System.IEquatable$1(System.Byte), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 42, 86, 0], ["MaxValue", 42, 86, 255]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = 0; | |
$t.MaxValue = 255; | |
$t.Parse = function Byte_Parse(s) { return Number.Parse(System.Byte, s); }; | |
$t.TryParse = function Byte_TryParse(s, result) { return Number.TryParse(System.Byte, s, result); }; | |
}); | |
System.Char = $d.declare("System.Char", Number, 40, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Char), System.IEquatable$1(System.Char)]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 40, 86, 0], ["MaxValue", 40, 86, 0xFFFF]], [["IsLetter", t.IsLetter, 22], ["IsWhiteSpace", t.IsWhiteSpace, 22], ["IsDigit", t.IsDigit, 22], ["ToUpper", t.ToUpper, 22], ["ToLower", t.ToLower, 22], ["IsUpper", t.IsUpper, 22], ["IsLower", t.IsLower, 22], ["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = 0; | |
$t.MaxValue = 0xFFFF; | |
$t.s_RegexIsLetter = null; | |
$t.s_RegexIsDigit = null; | |
$t.InitializeRegex = function Char_InitializeRegex() { | |
if ($t.s_RegexIsLetter != null) { | |
return; | |
} | |
$t.s_RegexIsLetter = new RegExp("[A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029]"); | |
$t.s_RegexIsDigit = new RegExp("[0-9\u0660-\u0669\u06F0-\u06F9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE7-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29]"); | |
}; | |
$t.IsLetter = function Char_IsLetter(c) { | |
if (c < 256) { | |
return (c >= 65 && c <= 90) || (c >= 97 && c <= 122); | |
} | |
else { | |
$t.InitializeRegex(); | |
return $t.s_RegexIsLetter.test(String.fromCharCode(c)); | |
} | |
}; | |
$t.IsWhiteSpace = function Char_IsWhiteSpace(c) { | |
if (c < 256) { | |
return (((c >= 9) && (c <= 19)) || (c == 32) || (c == 160) || (c == 133)); | |
} | |
else { | |
return /\s/.test(String.fromCharCode(c)); | |
} | |
}; | |
$t.IsDigit = function Char_IsDigit(c) { | |
if (c < 256) { | |
return (c >= 48) && (c <= 57); | |
} | |
else { | |
$t.InitializeRegex(); | |
return $t.s_RegexIsDigit.test(String.fromCharCode(c)); | |
} | |
}; | |
$t.ToUpper = function Char_ToUpper(c) { | |
return String.fromCharCode(c).toUpperCase().charCodeAt(0); | |
}; | |
$t.ToLower = function Char_ToLower(c) { | |
return String.fromCharCode(c).toLowerCase().charCodeAt(0); | |
}; | |
$t.IsUpper = function Char_IsUpper(c) { | |
return $t.ToUpper(c) == c && $t.ToLower(c) != c; | |
}; | |
$t.IsLower = function Char_IsLower(c) { | |
return $t.ToLower(c) == c && $t.ToUpper(c) != c; | |
}; | |
$t.Parse = function Char_Parse(s) { | |
if (s == null) | |
throw new System.ArgumentNullException.ctor$1("s"); | |
if (s.length != 1) | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_NeedSingleChar")); | |
return s.get_Chars(0); | |
}; | |
$t.TryParse = function Char_TryParse(s, result) { | |
result.value = 0; | |
if (s == null || s.length != 1) | |
return false; | |
result.value = s.get_Chars(0); | |
return true; | |
}; | |
}); | |
System.Collections.IComparer = $d.declare("System.Collections.IComparer", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Compare", null, 6]]]; }; | |
}); | |
System.Collections.Comparer = $d.declare("System.Collections.Comparer", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.IComparer]; | |
$t.$typeInfo = function(t, p) { return [257, [["Default", System.Collections.Comparer, 54], ["DefaultInvariant", System.Collections.Comparer, 54]], [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.cctor = function() { | |
$t.Default = new System.Collections.Comparer.ctor(System.Globalization.CultureInfo().CurrentCulture); | |
$t.DefaultInvariant = new System.Collections.Comparer.ctor(System.Globalization.CultureInfo().InvariantCulture); | |
$t.CompareInfoName = "CompareInfo"; | |
}; | |
$t.$ator = function() { | |
this.m_compareInfo = null; | |
}; | |
$t.ctor = function Comparer(culture) { | |
$t.$baseType.ctor.call(this); | |
if (culture == null) | |
throw new System.ArgumentNullException.ctor$1("culture"); | |
this.m_compareInfo = culture.get_CompareInfo(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor = function Comparer() { | |
$t.$baseType.ctor.call(this); | |
this.m_compareInfo = null; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function Comparer_Compare(a, b) { | |
if (a == b) | |
return 0; | |
if (a == null) | |
return -1; | |
if (b == null) | |
return 1; | |
if (this.m_compareInfo != null) { | |
var string1 = $d.as(a, String); | |
var string2 = $d.as(b, String); | |
if (string1 != null && string2 != null) | |
return this.m_compareInfo.Compare(string1, string2); | |
} | |
var comparable1 = $d.as(a, System.IComparable); | |
if (comparable1 != null) | |
return comparable1.System$IComparable$CompareTo(b); | |
var comparable2 = $d.as(b, System.IComparable); | |
if (comparable2 != null) | |
return -comparable2.System$IComparable$CompareTo(a); | |
else | |
throw new System.ArgumentException.ctor$1("Argument_ImplementIComparable"); | |
}; | |
$p.System$Collections$IComparer$Compare = $p.Compare; | |
}); | |
System.Collections.ComparisonComparer = $d.declare("System.Collections.ComparisonComparer", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.IComparer]; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this._comparison = null; | |
}; | |
$t.ctor = function ComparisonComparer(comparison) { | |
$t.$baseType.ctor.call(this); | |
this._comparison = comparison; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function ComparisonComparer_Compare(x, y) { | |
return this._comparison(x, y); | |
}; | |
$p.System$Collections$IComparer$Compare = $p.Compare; | |
}); | |
System.Collections.Generic.IComparer$1 = $d.declare("System.Collections.Generic.IComparer`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Compare", null, 6]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.Comparer$1 = $d.declare("System.Collections.Generic.Comparer`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [129, null, [["get_Default", t.get_Default, 22], ["Create", t.Create, 22], ["Compare", null, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6]], [["ctor", t.ctor, 4]], [["Default", System.Collections.Generic.Comparer$1(T), 0]]]; }; | |
$t.cctor = function() { | |
$t.defaultComparer = null; | |
}; | |
$t.get_Default = function Comparer$1_get_Default() { | |
var comparer = $t().defaultComparer; | |
if (comparer == null) { | |
comparer = $t.CreateComparer(); | |
$t().defaultComparer = comparer; | |
} | |
return comparer; | |
}; | |
$t.ctor = function Comparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.Create = function Comparer$1_Create(comparison) { | |
if (comparison == null) | |
throw new System.ArgumentNullException.ctor$1("comparison"); | |
else | |
return new (System.Collections.Generic.ComparisonComparer$1(T).ctor)(comparison); | |
}; | |
$t.CreateComparer = function Comparer$1_CreateComparer() { | |
var t = T; | |
var gcT = null; | |
if ((t.$typeKind >= 39 && t.$typeKind <= 48) || t.$typeKind == 63) | |
return new System.Collections.Generic.NumberComparer.ctor(); | |
if (t.$typeKind == 56) { | |
var u = t.$underlyingType; | |
if ($d.typeIsAssignableFrom(System.IComparable$1(u), u)) | |
gcT = u; | |
} | |
if ($d.typeIsAssignableFrom(System.IComparable$1(T), t)) | |
gcT = t; | |
if (t.$typeKind == 63 || (t.$typeKind == 56 && t.$underlyingType.$typeKind == 63)) | |
gcT = Number; | |
if (gcT != null) { | |
if (gcT.$typeKind >= 40 && gcT.$typeKind <= 51) | |
gcT = Number; | |
var gcTypeFunc = System.Collections.Generic.GenericComparer$1(gcT); | |
var result = new gcTypeFunc.ctor(); | |
return result; | |
} | |
return new (System.Collections.Generic.ObjectComparer$1(T).ctor)(); | |
}; | |
$p.System$Collections$IComparer$Compare = function Comparer$1_System_Collections_IComparer_Compare(x, y) { | |
if (x == null) { | |
return y != null ? -1 : 0; | |
} | |
else { | |
if (y == null) | |
return 1; | |
if ($d.is(x, T) && $d.is(y, T)) | |
return this.Compare($d.cast(x, T), $d.cast(y, T)); | |
throw new System.ArgumentException.ctor$1("Argument_InvalidArgumentForComparison"); | |
} | |
}; | |
$p.Equals = function Comparer$1_Equals(obj) { | |
return (obj != null) && (this.constructor == obj.constructor); | |
}; | |
$p.GetHashCode = function Comparer$1_GetHashCode() { | |
return this.constructor.$typeName.GetHashCode(); | |
}; | |
}, ["T"]); | |
System.Collections.Generic.NumberComparer = $d.declare("System.Collections.Generic.NumberComparer", System.Collections.Generic.Comparer$1(Number), 0, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(Number)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function NumberComparer() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function NumberComparer_Compare(x, y) { | |
return (x < y) ? -1 : (x > y) ? 1 : 0; | |
}; | |
$p.System$Collections$Generic$IComparer$1$Compare = $p.Compare; | |
}); | |
System.Collections.Generic.GenericComparer$1 = $d.declare("System.Collections.Generic.GenericComparer`1", System.Collections.Generic.Comparer$1, 768, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function GenericComparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function GenericComparer$1_Compare(x, y) { | |
if (x != null) { | |
if (y != null) | |
return x.System$IComparable$1$CompareTo(y); | |
return 1; | |
} | |
if (y != null) | |
return -1; | |
return 0; | |
}; | |
$p.System$Collections$Generic$IComparer$1$Compare = $p.Compare; | |
}, [$d.declareTP("T")]); | |
System.Collections.Generic.ObjectComparer$1 = $d.declare("System.Collections.Generic.ObjectComparer`1", System.Collections.Generic.Comparer$1, 768, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function ObjectComparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function ObjectComparer$1_Compare(x, y) { | |
return System.Collections.Comparer().Default.Compare(x, y); | |
}; | |
$p.System$Collections$Generic$IComparer$1$Compare = $p.Compare; | |
}, ["T"]); | |
System.Collections.Generic.ComparisonComparer$1 = $d.declare("System.Collections.Generic.ComparisonComparer`1", System.Collections.Generic.Comparer$1, 768, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this._comparison = null; | |
}; | |
$t.ctor = function ComparisonComparer$1(comparison) { | |
$t.$baseType.ctor.call(this); | |
this._comparison = comparison; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function ComparisonComparer$1_Compare(x, y) { | |
return this._comparison(x, y); | |
}; | |
$p.System$Collections$Generic$IComparer$1$Compare = $p.Compare; | |
}, ["T"]); | |
System.Collections.Generic.ComparerComparer = $d.declare("System.Collections.Generic.ComparerComparer", System.Collections.Generic.Comparer$1(System.Object), 0, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.Collections.IComparer, System.Collections.Generic.IComparer$1(System.Object)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this._comparer = null; | |
}; | |
$t.ctor = function ComparerComparer(comparer) { | |
$t.$baseType.ctor.call(this); | |
this._comparer = comparer; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function ComparerComparer_Compare(x, y) { | |
return this._comparer.System$Collections$IComparer$Compare(x, y); | |
}; | |
$p.System$Collections$Generic$IComparer$1$Compare = $p.Compare; | |
}); | |
System.Collections.DictionaryEntry = $d.declare("System.Collections.DictionaryEntry", null, 62, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Key", p.get_Key, 6], ["get_Value", p.get_Value, 6]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6]], [["Key", 1, 0], ["Value", 1, 1]]]; }; | |
$t.ctor = function DictionaryEntry() { | |
this._key = null; | |
this._value = null; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Key = function DictionaryEntry_get_Key() { | |
return this._key; | |
}; | |
$p.get_Value = function DictionaryEntry_get_Value() { | |
return this._value; | |
}; | |
$t.ctor$1 = function DictionaryEntry(key, value) { | |
this._key = key; | |
this._value = value; | |
}; | |
$t.ctor$1.prototype = $p; | |
}); | |
System.Collections.Generic.BucketItem = $d.declare("System.Collections.Generic.BucketItem", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, [["Key", System.Object, 38], ["Value", System.Object, 6]], null, [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this.Key = null; | |
this.Value = null; | |
}; | |
$t.ctor = function BucketItem(key, value) { | |
$t.$baseType.ctor.call(this); | |
this.Key = key; | |
this.Value = value; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Collections.Generic.IDictionary$2 = $d.declare("System.Collections.Generic.IDictionary`2", null, 322, $asm, function($t, $p, TKey, TValue) { | |
$t.$intfs = function() { return [System.Collections.Generic.ICollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.Generic.IEnumerable$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["ContainsKey", null, 6], ["Add", null, 6], ["Remove", null, 6], ["TryGetValue", null, 6]], null, [["this[]", TValue, null, null, [["key", TKey, 0]]], ["Keys", System.Collections.Generic.ICollection$1(TKey)], ["Values", System.Collections.Generic.ICollection$1(TValue)]]]; }; | |
}, ["TKey", "TValue"]); | |
System.Collections.IDictionary = $d.declare("System.Collections.IDictionary", null, 66, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.ICollection, System.Collections.IEnumerable]; | |
$t.$typeInfo = function(t, p) { return [161, null, [["Contains", null, 6], ["Add", null, 6], ["Clear", null, 6], ["GetEnumerator", null, 6], ["Remove", null, 6]], null, [["this[]", 1, null, null, [["key", 1, 0]]], ["Keys", System.Collections.ICollection], ["Values", System.Collections.ICollection], ["IsReadOnly", 39], ["IsFixedSize", 39]]]; }; | |
}); | |
System.Collections.Generic.IReadOnlyDictionary$2 = $d.declare("System.Collections.Generic.IReadOnlyDictionary`2", null, 322, $asm, function($t, $p, TKey, TValue) { | |
$t.$intfs = function() { return [System.Collections.Generic.IReadOnlyCollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.Generic.IEnumerable$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["ContainsKey", null, 6], ["TryGetValue", null, 6]], null, [["this[]", TValue, null, null, [["key", TKey, 0]]], ["Keys", System.Collections.Generic.IEnumerable$1(TKey)], ["Values", System.Collections.Generic.IEnumerable$1(TValue)]]]; }; | |
}, ["TKey", "TValue"]); | |
System.Collections.Generic.Dictionary$2 = $d.declare("System.Collections.Generic.Dictionary`2", System.Object, 256, $asm, function($t, $p, TKey, TValue) { | |
$t.$intfs = function() { return [System.Collections.Generic.IDictionary$2(TKey, TValue), System.Collections.Generic.ICollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary$2(TKey, TValue), System.Collections.Generic.IReadOnlyCollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.Generic.IEnumerable$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue)), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Add", p.Add$1, 6], ["Remove", p.Remove, 6], ["ContainsKey", p.ContainsKey, 6], ["ContainsValue", p.ContainsValue, 6], ["Clear", p.Clear, 6], ["TryGetValue", p.TryGetValue, 6], ["get_Item", p.get_Item, 6], ["set_Item", p.set_Item, 6], ["get_Keys", p.get_Keys, 6], ["get_Values", p.get_Values, 6], ["get_Count", p.get_Count, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["Add", p.Add, 6], ["CopyTo", p.CopyTo$1, 6], ["get_IsFixedSize", p.get_IsFixedSize, 6]], [["ctor", t.ctor, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6], ["ctor$5", t.ctor$5, 6], ["ctor$1", t.ctor$1, 6], ["ctor$4", t.ctor$4, 6]], [["this[]", TValue, 6, 7, [["key", TKey, 0]]], ["Keys", System.Collections.Generic.ICollection$1(TKey), 8], ["Values", System.Collections.Generic.ICollection$1(TValue), 9], ["Count", 45, 10], ["SyncRoot", 1, 11], ["IsSynchronized", 39, 12], ["IsReadOnly", 39, 15], ["IsFixedSize", 39, 18]]]; }; | |
$t.$ator = function() { | |
this.storage = null; | |
this.comparer = null; | |
this.count = 0; | |
this.keys = null; | |
this.values = null; | |
}; | |
$t.ctor = function Dictionary$2() { | |
$t.ctor$2.call(this, System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$2 = function Dictionary$2(comparer) { | |
$t.$baseType.ctor.call(this); | |
this.storage = {}; | |
this.comparer = comparer; | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function Dictionary$2(capacity) { | |
$t.ctor.call(this); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$5 = function Dictionary$2(capacity, comparer) { | |
$t.ctor$2.call(this, comparer || System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.ctor$5.prototype = $p; | |
$t.ctor$1 = function Dictionary$2(dictionary) { | |
$t.ctor$4.call(this, dictionary, null); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$4 = function Dictionary$2(dictionary, comparer) { | |
$t.ctor$5.call(this, dictionary != null ? dictionary.System$Collections$Generic$ICollection$1$get_Count() : 0, | |
comparer); | |
if (dictionary == null) | |
throw new System.ArgumentNullException.ctor$1("dictionary"); | |
var $iter = $d.cast(dictionary, System.Collections.Generic.IEnumerable$1(System.Collections.Generic.KeyValuePair$2(TKey, | |
TValue))); | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var keyValuePair = $enumerator.System$Collections$IEnumerator$get_Current(); | |
this.Add$1(keyValuePair.get_Key(), keyValuePair.get_Value()); | |
} | |
}; | |
$t.ctor$4.prototype = $p; | |
$p.Add$1 = function Dictionary$2_Add(key, value) { | |
this.Insert(key, value, true); | |
}; | |
$p.Insert = function Dictionary$2_Insert(key, value, add) { | |
if (key == null) | |
throw new System.ArgumentNullException.ctor$1("key"); | |
var hashCode = this.comparer.System$Collections$Generic$IEqualityComparer$1$GetHashCode(key); | |
var bucket = this.storage[hashCode]; | |
if (bucket == null) { | |
bucket = new Array(); | |
this.storage[hashCode] = bucket; | |
} | |
else { | |
for (var i = 0; i < bucket.length; ++i) { | |
if (this.comparer.System$Collections$Generic$IEqualityComparer$1$Equals(bucket[i].Key, | |
key)) { | |
if (add) | |
throw new System.ArgumentException.ctor$1("An item with the same key has already been added."); | |
bucket[i].Value = value; | |
return; | |
} | |
} | |
} | |
bucket.push(new System.Collections.Generic.BucketItem.ctor(key, value)); | |
this.count++; | |
}; | |
$p.Remove = function Dictionary$2_Remove(key) { | |
var hashCode = this.comparer.System$Collections$Generic$IEqualityComparer$1$GetHashCode(key); | |
var bucket = this.storage[hashCode]; | |
if (bucket != null) { | |
for (var i = 0; i < bucket.length; ++i) { | |
if (this.comparer.System$Collections$Generic$IEqualityComparer$1$Equals(bucket[i].Key, | |
key)) { | |
bucket.splice(i, 1); | |
if (bucket.length == 0) | |
delete this.storage[hashCode]; | |
this.count--; | |
return true; | |
} | |
} | |
} | |
return false; | |
}; | |
$p.ContainsKey = function Dictionary$2_ContainsKey(key) { | |
var hashCode = this.comparer.System$Collections$Generic$IEqualityComparer$1$GetHashCode(key); | |
var bucket = this.storage[hashCode]; | |
if (bucket != null) | |
for (var i = 0; i < bucket.length; ++i) { | |
if (this.comparer.System$Collections$Generic$IEqualityComparer$1$Equals(bucket[i].Key, | |
key)) | |
return true; | |
} | |
return false; | |
}; | |
$p.ContainsValue = function Dictionary$2_ContainsValue(value) { | |
var ec = System.Collections.Generic.EqualityComparer$1(TValue).get_Default(); | |
var hashes = Object.keys(this.storage); | |
for (var i = 0; i < hashes.length; ++i) { | |
var bucket = this.storage[hashes[i]]; | |
for (var $i = 0, $length = bucket.length; $i != $length; $i++) { | |
var item = bucket[$i]; | |
if (ec.Equals$1(item.Value, value)) | |
return true; | |
} | |
} | |
return false; | |
}; | |
$p.Clear = function Dictionary$2_Clear() { | |
this.storage = {}; | |
this.count = 0; | |
}; | |
$p.TryGetValue = function Dictionary$2_TryGetValue(key, value) { | |
var hashCode = this.comparer.System$Collections$Generic$IEqualityComparer$1$GetHashCode(key); | |
var bucket = this.storage[hashCode]; | |
if (bucket != null) | |
for (var i = 0; i < bucket.length; ++i) { | |
if (this.comparer.System$Collections$Generic$IEqualityComparer$1$Equals(bucket[i].Key, | |
key)) { | |
value.value = bucket[i].Value; | |
return true; | |
} | |
} | |
value.value = $d.default(TValue); | |
return false; | |
}; | |
$p.get_Item = function Dictionary$2_get_Item(key) { | |
var result = {}; | |
if (!this.TryGetValue(key, result)) | |
throw new System.Collections.Generic.KeyNotFoundException.ctor$1(key.toString()); | |
return result.value; | |
}; | |
$p.set_Item = function Dictionary$2_set_Item(key, value) { | |
this.Insert(key, value, false); | |
}; | |
$p.get_Keys = function Dictionary$2_get_Keys() { | |
this.keys = this.keys || new (System.Collections.Generic.Dictionary$2.KeyCollection(TKey, TValue).ctor)(this); | |
return this.keys; | |
}; | |
$p.get_Values = function Dictionary$2_get_Values() { | |
this.values = this.values || new (System.Collections.Generic.Dictionary$2.ValueCollection(TKey, | |
TValue).ctor)(this); | |
return this.values; | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function Dictionary$2_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.get_Count = function Dictionary$2_get_Count() { | |
return this.count; | |
}; | |
$p.get_SyncRoot = function Dictionary$2_get_SyncRoot() { | |
return this; | |
}; | |
$p.get_IsSynchronized = function Dictionary$2_get_IsSynchronized() { | |
return true; | |
}; | |
$p.CopyTo = function Dictionary$2_CopyTo(array, index) { | |
this.CopyTo$1(array, index); | |
}; | |
$p.GetEnumerator = function Dictionary$2_GetEnumerator() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(System.Collections.Generic.KeyValuePair$2(TKey, | |
TValue)).ctor)(); | |
var hashes = null; | |
var i = null; | |
var bucket = null; | |
var j = null; | |
var item = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
hashes = Object.keys(this.storage); | |
i = 0; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i < hashes.length) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
bucket = this.storage[hashes[i]]; | |
j = 0; | |
$state = 5; | |
continue $top; | |
case 4: | |
++i; | |
$state = 1; | |
continue $top; | |
case 5: | |
while (j < bucket.length) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 4; | |
continue $top; | |
case 7: | |
item = bucket[j]; | |
$state = 9; | |
$stateMachine.set_Current(new (System.Collections.Generic.KeyValuePair$2(TKey, | |
TValue).ctor$1)(item.Key, item.Value)); | |
return true; | |
case 8: | |
++j; | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.GetEnumeratorKeys = function Dictionary$2_GetEnumeratorKeys() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TKey).ctor)(); | |
var hashes = null; | |
var i = null; | |
var bucket = null; | |
var j = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
hashes = Object.keys(this.storage); | |
i = 0; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i < hashes.length) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
bucket = this.storage[hashes[i]]; | |
j = 0; | |
$state = 5; | |
continue $top; | |
case 4: | |
++i; | |
$state = 1; | |
continue $top; | |
case 5: | |
while (j < bucket.length) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 4; | |
continue $top; | |
case 7: | |
$state = 9; | |
$stateMachine.set_Current(bucket[j].Key); | |
return true; | |
case 8: | |
++j; | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.GetEnumeratorValues = function Dictionary$2_GetEnumeratorValues() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TValue).ctor)(); | |
var hashes = null; | |
var i = null; | |
var bucket = null; | |
var j = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
hashes = Object.keys(this.storage); | |
i = 0; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i < hashes.length) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
bucket = this.storage[hashes[i]]; | |
j = 0; | |
$state = 5; | |
continue $top; | |
case 4: | |
++i; | |
$state = 1; | |
continue $top; | |
case 5: | |
while (j < bucket.length) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 4; | |
continue $top; | |
case 7: | |
$state = 9; | |
$stateMachine.set_Current(bucket[j].Value); | |
return true; | |
case 8: | |
++j; | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.get_IsReadOnly = function Dictionary$2_get_IsReadOnly() { | |
return false; | |
}; | |
$p.Add = function Dictionary$2_Add(item) { | |
this.Add$1(item.get_Key(), item.get_Value()); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Contains = function Dictionary$2_System_Collections_Generic_ICollection$System_Collections_Generic_KeyValuePair$TKey$TValue$$_Contains(item) { | |
return this.ContainsKey(item.get_Key()) && $d.equals(this.get_Item(item.get_Key()), item.get_Value()); | |
}; | |
$p.CopyTo$1 = function Dictionary$2_CopyTo(array, arrayIndex) { | |
var hashes = Object.keys(this.storage); | |
for (var i = 0; i < hashes.length; ++i) { | |
var bucket = this.storage[hashes[i]]; | |
for (var j = 0; j < bucket.length; ++j) { | |
var item = bucket[j]; | |
array[arrayIndex++] = new (System.Collections.Generic.KeyValuePair$2(TKey, TValue).ctor$1)(item.Key, | |
item.Value); | |
} | |
} | |
}; | |
$p.System$Collections$Generic$ICollection$1$Remove = function Dictionary$2_System_Collections_Generic_ICollection$System_Collections_Generic_KeyValuePair$TKey$TValue$$_Remove(item) { | |
return false; | |
}; | |
$p.System$Collections$IDictionary$get_Item = function Dictionary$2_System$Collections$IDictionary$get_Item(key) { | |
return this.get_Item($d.cast(key, TKey)); | |
}; | |
$p.System$Collections$IDictionary$set_Item = function Dictionary$2_System$Collections$IDictionary$set_Item(key, value) { | |
this.set_Item($d.cast(key, TKey), $d.cast(value, TValue)); | |
}; | |
$p.System$Collections$IDictionary$get_Keys = function Dictionary$2_System$Collections$IDictionary$get_Keys() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IDictionary$get_Values = function Dictionary$2_System$Collections$IDictionary$get_Values() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_IsFixedSize = function Dictionary$2_get_IsFixedSize() { | |
return false; | |
}; | |
$p.System$Collections$IDictionary$Contains = function Dictionary$2_System_Collections_IDictionary_Contains(key) { | |
return this.ContainsKey($d.cast(key, TKey)); | |
}; | |
$p.System$Collections$IDictionary$Add = function Dictionary$2_System_Collections_IDictionary_Add(key, value) { | |
this.Add$1($d.cast(key, TKey), $d.cast(value, TValue)); | |
}; | |
$p.System$Collections$IDictionary$GetEnumerator = function Dictionary$2_System_Collections_IDictionary_GetEnumerator() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$IDictionary$Remove = function Dictionary$2_System_Collections_IDictionary_Remove(key) { | |
this.Remove($d.cast(key, TKey)); | |
}; | |
$p.System$Collections$Generic$IReadOnlyDictionary$2$get_Keys = function Dictionary$2_System$Collections$Generic$IReadOnlyDictionary$2$get_Keys() { | |
return this.get_Keys(); | |
}; | |
$p.System$Collections$Generic$IReadOnlyDictionary$2$get_Values = function Dictionary$2_System$Collections$Generic$IReadOnlyDictionary$2$get_Values() { | |
return this.get_Values(); | |
}; | |
$p.System$Collections$Generic$IDictionary$2$get_Item = $p.get_Item; | |
$p.System$Collections$Generic$IDictionary$2$set_Item = $p.set_Item; | |
$p.System$Collections$Generic$IDictionary$2$get_Keys = $p.get_Keys; | |
$p.System$Collections$Generic$IDictionary$2$get_Values = $p.get_Values; | |
$p.System$Collections$Generic$IDictionary$2$ContainsKey = $p.ContainsKey; | |
$p.System$Collections$Generic$IDictionary$2$Add = $p.Add$1; | |
$p.System$Collections$Generic$IDictionary$2$Remove = $p.Remove; | |
$p.System$Collections$Generic$IDictionary$2$TryGetValue = $p.TryGetValue; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$Generic$ICollection$1$Add = $p.Add; | |
$p.System$Collections$Generic$ICollection$1$Clear = $p.Clear; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo$1; | |
$p.System$Collections$IDictionary$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$IDictionary$get_IsFixedSize = $p.get_IsFixedSize; | |
$p.System$Collections$IDictionary$Clear = $p.Clear; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$ICollection$get_SyncRoot = $p.get_SyncRoot; | |
$p.System$Collections$ICollection$get_IsSynchronized = $p.get_IsSynchronized; | |
$p.System$Collections$ICollection$CopyTo = $p.CopyTo; | |
$p.System$Collections$Generic$IReadOnlyDictionary$2$get_Item = $p.get_Item; | |
$p.System$Collections$Generic$IReadOnlyDictionary$2$ContainsKey = $p.ContainsKey; | |
$p.System$Collections$Generic$IReadOnlyDictionary$2$TryGetValue = $p.TryGetValue; | |
$p.System$Collections$Generic$IReadOnlyCollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TKey", "TValue"]); | |
System.Collections.Generic.Dictionary$2.KeyCollection = $d.declare("KeyCollection", System.Object, 256, System.Collections.Generic.Dictionary$2, function($t, $p, TKey, TValue) { | |
$t.$intfs = function() { return [System.Collections.Generic.ICollection$1(TKey), System.Collections.Generic.IEnumerable$1(TKey), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [259, null, [["Contains", p.Contains, 6], ["get_Count", p.get_Count, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["Add", p.Add, 6], ["Clear", p.Clear, 6], ["CopyTo", p.CopyTo$1, 6], ["Remove", p.Remove, 6]], [["ctor", t.ctor, 6]], [["Count", 45, 1], ["SyncRoot", 1, 3], ["IsSynchronized", 39, 4], ["IsReadOnly", 39, 6]]]; }; | |
$t.$ator = function() { | |
this.dictionary = null; | |
}; | |
$t.ctor = function KeyCollection(dictionary) { | |
$t.$baseType.ctor.call(this); | |
this.dictionary = dictionary; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Contains = function KeyCollection_Contains(item) { | |
return this.dictionary.ContainsKey(item); | |
}; | |
$p.get_Count = function KeyCollection_get_Count() { | |
return this.dictionary.get_Count(); | |
}; | |
$p.GetEnumerator = function KeyCollection_GetEnumerator() { | |
return this.dictionary.GetEnumeratorKeys(); | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function KeyCollection_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.get_SyncRoot = function KeyCollection_get_SyncRoot() { | |
return this.dictionary.get_SyncRoot(); | |
}; | |
$p.get_IsSynchronized = function KeyCollection_get_IsSynchronized() { | |
return this.dictionary.get_IsSynchronized(); | |
}; | |
$p.CopyTo = function KeyCollection_CopyTo(array, index) { | |
this.CopyTo$1(array, index); | |
}; | |
$p.get_IsReadOnly = function KeyCollection_get_IsReadOnly() { | |
return true; | |
}; | |
$p.Add = function KeyCollection_Add(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.Clear = function KeyCollection_Clear() { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.CopyTo$1 = function KeyCollection_CopyTo(array, arrayIndex) { | |
var hashes = Object.keys(this.dictionary.storage); | |
for (var i = 0; i < hashes.length; ++i) { | |
var bucket = this.dictionary.storage[hashes[i]]; | |
for (var j = 0; j < bucket.length; ++j) { | |
array[arrayIndex++] = bucket[j].Key; | |
} | |
} | |
}; | |
$p.Remove = function KeyCollection_Remove(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$Generic$ICollection$1$Add = $p.Add; | |
$p.System$Collections$Generic$ICollection$1$Clear = $p.Clear; | |
$p.System$Collections$Generic$ICollection$1$Contains = $p.Contains; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo$1; | |
$p.System$Collections$Generic$ICollection$1$Remove = $p.Remove; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TKey", "TValue"]); | |
System.Collections.Generic.Dictionary$2.ValueCollection = $d.declare("ValueCollection", System.Object, 256, System.Collections.Generic.Dictionary$2, function($t, $p, TKey, TValue) { | |
$t.$intfs = function() { return [System.Collections.Generic.ICollection$1(TValue), System.Collections.Generic.IEnumerable$1(TValue), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [259, null, [["Contains", p.Contains, 6], ["get_Count", p.get_Count, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["Add", p.Add, 6], ["Clear", p.Clear, 6], ["CopyTo", p.CopyTo$1, 6], ["Remove", p.Remove, 6]], [["ctor", t.ctor, 6]], [["Count", 45, 1], ["SyncRoot", 1, 3], ["IsSynchronized", 39, 4], ["IsReadOnly", 39, 6]]]; }; | |
$t.$ator = function() { | |
this.dictionary = null; | |
}; | |
$t.ctor = function ValueCollection(dictionary) { | |
$t.$baseType.ctor.call(this); | |
this.dictionary = dictionary; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Contains = function ValueCollection_Contains(item) { | |
return this.dictionary.ContainsValue(item); | |
}; | |
$p.get_Count = function ValueCollection_get_Count() { | |
return this.dictionary.get_Count(); | |
}; | |
$p.GetEnumerator = function ValueCollection_GetEnumerator() { | |
return this.dictionary.GetEnumeratorValues(); | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function ValueCollection_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.get_SyncRoot = function ValueCollection_get_SyncRoot() { | |
return this.dictionary.get_SyncRoot(); | |
}; | |
$p.get_IsSynchronized = function ValueCollection_get_IsSynchronized() { | |
return this.dictionary.get_IsSynchronized(); | |
}; | |
$p.CopyTo = function ValueCollection_CopyTo(array, index) { | |
this.CopyTo$1(array, index); | |
}; | |
$p.get_IsReadOnly = function ValueCollection_get_IsReadOnly() { | |
return true; | |
}; | |
$p.Add = function ValueCollection_Add(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.Clear = function ValueCollection_Clear() { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.CopyTo$1 = function ValueCollection_CopyTo(array, arrayIndex) { | |
var hashes = Object.keys(this.dictionary.storage); | |
for (var i = 0; i < hashes.length; ++i) { | |
var bucket = this.dictionary.storage[hashes[i]]; | |
for (var j = 0; j < bucket.length; ++j) { | |
array[arrayIndex++] = bucket[j].Value; | |
} | |
} | |
}; | |
$p.Remove = function ValueCollection_Remove(item) { | |
throw new System.NotSupportedException.ctor(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$Generic$ICollection$1$Add = $p.Add; | |
$p.System$Collections$Generic$ICollection$1$Clear = $p.Clear; | |
$p.System$Collections$Generic$ICollection$1$Contains = $p.Contains; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo$1; | |
$p.System$Collections$Generic$ICollection$1$Remove = $p.Remove; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TKey", "TValue"]); | |
System.Collections.IEqualityComparer = $d.declare("System.Collections.IEqualityComparer", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Equals", null, 6], ["GetHashCode", null, 6]]]; }; | |
}); | |
System.Collections.Generic.IEqualityComparer$1 = $d.declare("System.Collections.Generic.IEqualityComparer`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Equals", null, 6], ["GetHashCode", null, 6]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.EqualityComparer$1 = $d.declare("System.Collections.Generic.EqualityComparer`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [129, null, [["get_Default", t.get_Default, 22], ["Equals", null, 6], ["GetHashCode", null, 6], ["IndexOf", p.IndexOf, 3], ["LastIndexOf", p.LastIndexOf, 3], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6]], [["ctor", t.ctor, 4]], [["Default", System.Collections.Generic.EqualityComparer$1(T), 0]]]; }; | |
$t.cctor = function() { | |
$t.defaultComparer = null; | |
}; | |
$t.get_Default = function EqualityComparer$1_get_Default() { | |
var equalityComparer = $t().defaultComparer; | |
if (equalityComparer == null) { | |
equalityComparer = $t.CreateComparer(); | |
$t().defaultComparer = equalityComparer; | |
} | |
return equalityComparer; | |
}; | |
$t.ctor = function EqualityComparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.CreateComparer = function EqualityComparer$1_CreateComparer() { | |
var t = T; | |
if ((t.$typeKind & 32) != 0 && t.$typeKind != 62 && t.$typeKind != 56) | |
return new System.Collections.Generic.NumberEqualityComparer.ctor(); | |
var gecT = null; | |
if (t.$typeKind == 56) { | |
var u = t.$underlyingType; | |
if ((u.$typeKind & 32) != 0 && u.$typeKind != 62) | |
return new System.Collections.Generic.NumberEqualityComparer.ctor(); | |
if ($d.typeIsAssignableFrom(System.IEquatable$1(u), u)) | |
gecT = u; | |
} | |
if ($d.typeIsAssignableFrom(System.IEquatable$1(T), t)) | |
gecT = t; | |
if (gecT != null) { | |
var gcTypeFunc = System.Collections.Generic.GenericEqualityComparer$1(gecT); | |
var result = new gcTypeFunc.ctor(); | |
return result; | |
} | |
return new (System.Collections.Generic.ObjectEqualityComparer$1(T).ctor)(); | |
}; | |
$p.IndexOf = function EqualityComparer$1_IndexOf(array, value, startIndex, count) { | |
var num = startIndex + count; | |
for (var index = startIndex; index < num; ++index) { | |
if (this.Equals$1(array[index], value)) | |
return index; | |
} | |
return -1; | |
}; | |
$p.LastIndexOf = function EqualityComparer$1_LastIndexOf(array, value, startIndex, count) { | |
var num = startIndex - count + 1; | |
for (var index = startIndex; index >= num; --index) { | |
if (this.Equals$1(array[index], value)) | |
return index; | |
} | |
return -1; | |
}; | |
$p.System$Collections$IEqualityComparer$GetHashCode = function EqualityComparer$1_System_Collections_IEqualityComparer_GetHashCode(obj) { | |
if (obj == null) | |
return 0; | |
if ($d.is(obj, T)) | |
return this.GetHashCode$1(obj); | |
throw new System.Exception.ctor(); | |
}; | |
$p.System$Collections$IEqualityComparer$Equals = function EqualityComparer$1_System_Collections_IEqualityComparer_Equals(x, y) { | |
if (x == y) | |
return true; | |
if (x == null || y == null) | |
return false; | |
if ($d.is(x, T) && $d.is(y, T)) | |
return this.Equals$1(x, y); | |
throw new System.Exception.ctor(); | |
}; | |
$p.Equals = function EqualityComparer$1_Equals(obj) { | |
return (obj != null) && (this.constructor == obj.constructor); | |
}; | |
$p.GetHashCode = function EqualityComparer$1_GetHashCode() { | |
return this.constructor.$typeName.GetHashCode(); | |
}; | |
}, ["T"]); | |
System.Collections.Generic.GenericEqualityComparer$1 = $d.declare("System.Collections.Generic.GenericEqualityComparer`1", System.Collections.Generic.EqualityComparer$1, 768, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Equals", p.Equals$1, 6], ["GetHashCode", p.GetHashCode$1, 6], ["IndexOf", p.IndexOf, 3], ["LastIndexOf", p.LastIndexOf, 3]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function GenericEqualityComparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals$1 = function GenericEqualityComparer$1_Equals(x, y) { | |
if (x != null) { | |
if (y != null) | |
return x.System$IEquatable$1$Equals(y); | |
return false; | |
} | |
if (y != null) | |
return false; | |
return true; | |
}; | |
$p.GetHashCode$1 = function GenericEqualityComparer$1_GetHashCode(obj) { | |
if (obj == null) | |
return 0; | |
return $d.getHashCode(obj); | |
}; | |
$p.IndexOf = function GenericEqualityComparer$1_IndexOf(array, value, startIndex, count) { | |
var endIndex = startIndex + count; | |
if (value == null) { | |
for (var i = startIndex; i < endIndex; i++) { | |
if (array[i] == null) | |
return i; | |
} | |
} | |
else { | |
for (var i = startIndex; i < endIndex; i++) { | |
if (array[i] != null && array[i].System$IEquatable$1$Equals(value)) | |
return i; | |
} | |
} | |
return -1; | |
}; | |
$p.LastIndexOf = function GenericEqualityComparer$1_LastIndexOf(array, value, startIndex, count) { | |
var endIndex = startIndex - count + 1; | |
if (value == null) { | |
for (var i = startIndex; i >= endIndex; i--) { | |
if (array[i] == null) | |
return i; | |
} | |
} | |
else { | |
for (var i = startIndex; i >= endIndex; i--) { | |
if (array[i] != null && array[i].System$IEquatable$1$Equals(value)) | |
return i; | |
} | |
} | |
return -1; | |
}; | |
$p.System$Collections$Generic$IEqualityComparer$1$Equals = $p.Equals$1; | |
$p.System$Collections$Generic$IEqualityComparer$1$GetHashCode = $p.GetHashCode$1; | |
}, [$d.declareTP("T")]); | |
System.Collections.Generic.ObjectEqualityComparer$1 = $d.declare("System.Collections.Generic.ObjectEqualityComparer`1", System.Collections.Generic.EqualityComparer$1, 768, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer$1(T)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Equals", p.Equals$1, 6], ["GetHashCode", p.GetHashCode$1, 6], ["IndexOf", p.IndexOf, 3], ["LastIndexOf", p.LastIndexOf, 3]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function ObjectEqualityComparer$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals$1 = function ObjectEqualityComparer$1_Equals(x, y) { | |
if (x != null) { | |
if (y != null) | |
return $d.equals(x, y); | |
return false; | |
} | |
if (y != null) | |
return false; | |
return true; | |
}; | |
$p.GetHashCode$1 = function ObjectEqualityComparer$1_GetHashCode(obj) { | |
if (obj == null) | |
return 0; | |
return $d.getHashCode(obj); | |
}; | |
$p.IndexOf = function ObjectEqualityComparer$1_IndexOf(array, value, startIndex, count) { | |
var endIndex = startIndex + count; | |
if (value == null) { | |
for (var i = startIndex; i < endIndex; i++) { | |
if (array[i] == null) | |
return i; | |
} | |
} | |
else { | |
for (var i = startIndex; i < endIndex; i++) { | |
if (array[i] != null && $d.equals(array[i], value)) | |
return i; | |
} | |
} | |
return -1; | |
}; | |
$p.LastIndexOf = function ObjectEqualityComparer$1_LastIndexOf(array, value, startIndex, count) { | |
var endIndex = startIndex - count + 1; | |
if (value == null) { | |
for (var i = startIndex; i >= endIndex; i--) { | |
if (array[i] == null) | |
return i; | |
} | |
} | |
else { | |
for (var i = startIndex; i >= endIndex; i--) { | |
if (array[i] != null && $d.equals(array[i], value)) | |
return i; | |
} | |
} | |
return -1; | |
}; | |
$p.System$Collections$Generic$IEqualityComparer$1$Equals = $p.Equals$1; | |
$p.System$Collections$Generic$IEqualityComparer$1$GetHashCode = $p.GetHashCode$1; | |
}, ["T"]); | |
System.Number = $d.declare("System.Number", null, 61, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IFormattable, System.IComparable$1(Number), System.IEquatable$1(Number)]; }; | |
$t.$typeInfo = function(t, p) { return [128, null, [["Parse", t.Parse, 19], ["TryParse", t.TryParse, 19], ["LocaleFormat", p.LocaleFormat, 6], ["ToString", p.ToString, 6], ["ToString", p.ToString$2, 6], ["ToString", p.ToString$1, 6], ["CompareTo", p.CompareTo, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6]]]; }; | |
$t.Parse = function Number_Parse(T, s) { | |
var t = T; | |
var isFloat = (t == System.Single) || (t == System.Double); | |
var result = isFloat ? parseFloat(s) : parseInt(s); | |
if (isNaN(result)) | |
throw new System.FormatException.ctor$1("Input string was not in a correct format"); | |
if (!isFloat && (result < t.MinValue || result > t.MaxValue)) | |
throw new System.OverflowException.ctor$1("Value was either too large or too small for " + t.$typeName); | |
return result; | |
}; | |
$t.TryParse = function Number_TryParse(T, s, result) { | |
var t = T; | |
var isFloat = (t == System.Single) || (t == System.Double); | |
result.value = 0; | |
var value = isFloat ? parseFloat(s) : parseInt(s); | |
if (isNaN(value) || (!isFloat && (value < t.MinValue || value > t.MaxValue))) | |
return false; | |
result.value = value; | |
return true; | |
}; | |
$p.LocaleFormat = function Number_LocaleFormat(format) { | |
return null; | |
}; | |
$p.ToString = function Number_ToString() { | |
return this.toString(); | |
}; | |
$p.ToString$2 = function Number_ToString(format, formatProvider) { | |
return this.ToString$1(format); | |
}; | |
$p.AddCommas = function Number_AddCommas() { | |
return $t.AddCommas(this.toString()); | |
}; | |
$t.AddCommas = function Number_AddCommas(num) { | |
var parts = num.split("."); | |
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
return parts.join("."); | |
}; | |
$p.ToString$1 = function Number_ToString(format) { | |
if (String.IsNullOrEmpty(format)) | |
return this.toString(); | |
var result = this.TryFormatStandard(format); | |
return result; | |
}; | |
$p.TryFormatStandard = function Number_TryFormatStandard(format) { | |
var result = null; | |
var specifier = format.get_Chars(0); | |
var precision = format.length == 1 ? -1 : parseInt(format.Substring(1)); | |
switch (specifier) { | |
case 99 /*'c'*/: | |
case 67 /*'C'*/: | |
{ | |
if (precision == -1) { | |
precision = 2; | |
} | |
result = "$" + $t.AddCommas(this.toFixed(precision)); | |
break; | |
} | |
case 100 /*'d'*/: | |
case 68 /*'D'*/: | |
{ | |
result = (this | 0).toString(); | |
while (result.length < precision) { | |
result = "0" + result; | |
} | |
break; | |
} | |
case 101 /*'e'*/: | |
case 69 /*'E'*/: | |
{ | |
result = (precision == -1) ? this.toExponential() : this.toExponential(precision); | |
if (specifier == 69 /*'E'*/) { | |
result = result.toUpperCase(); | |
} | |
break; | |
} | |
case 102 /*'f'*/: | |
case 70 /*'F'*/: | |
{ | |
if (precision == -1) { | |
precision = 2; | |
} | |
result = this.toFixed(precision); | |
break; | |
} | |
case 112 /*'p'*/: | |
case 80 /*'P'*/: | |
{ | |
if (precision == -1) { | |
precision = 2; | |
} | |
var p = this * 100; | |
result = p.toFixed(precision) + "%"; | |
break; | |
} | |
case 120 /*'x'*/: | |
case 88 /*'X'*/: | |
{ | |
var s = this.toString(16); | |
if (specifier == 88 /*'X'*/) { | |
s = s.toUpperCase(); | |
} | |
while (s.length < precision) { | |
s = "0" + s; | |
} | |
result = s; | |
break; | |
} | |
default: | |
throw new System.Exception.ctor$1("format " + format + " is invalid or not supported."); | |
} | |
return result; | |
}; | |
$p.CompareTo = function Number_CompareTo(obj) { | |
if (this < obj) { | |
return -1; | |
} | |
if (this > obj) { | |
return 1; | |
} | |
if (this == obj) { | |
return 0; | |
} | |
if (!isNaN(this)) { | |
return 1; | |
} | |
if (!isNaN(obj)) { | |
return -1; | |
} | |
return 0; | |
}; | |
$p.Equals = function Number_Equals(obj) { | |
return (this === obj); | |
}; | |
$p.GetHashCode = function Number_GetHashCode() { | |
var hashCode = this | 0; | |
if (hashCode === this) | |
return hashCode; | |
else | |
return this.toExponential().GetHashCode(); | |
}; | |
$p.System$IComparable$CompareTo = $p.CompareTo; | |
$p.System$IFormattable$ToString = $p.ToString$2; | |
$p.System$IComparable$1$CompareTo = $p.CompareTo; | |
$p.System$IEquatable$1$Equals = $p.Equals; | |
}, null, null, Number); | |
System.Collections.Generic.NumberEqualityComparer = $d.declare("System.Collections.Generic.NumberEqualityComparer", System.Collections.Generic.EqualityComparer$1(Number), 0, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer$1(Number)]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["Equals", p.Equals$1, 6], ["GetHashCode", p.GetHashCode$1, 6], ["IndexOf", p.IndexOf, 3], ["LastIndexOf", p.LastIndexOf, 3]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function NumberEqualityComparer() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals$1 = function NumberEqualityComparer_Equals(x, y) { | |
return x == y; | |
}; | |
$p.GetHashCode$1 = function NumberEqualityComparer_GetHashCode(x) { | |
if (x == null) | |
return 0; | |
return x.GetHashCode(); | |
}; | |
$p.IndexOf = function NumberEqualityComparer_IndexOf(array, value, startIndex, count) { | |
if (count == 0) | |
return -1; | |
var endIndex = startIndex + count; | |
for (var i = startIndex; i < endIndex; i++) { | |
if (array[i] == value) | |
return i; | |
} | |
return -1; | |
}; | |
$p.LastIndexOf = function NumberEqualityComparer_LastIndexOf(array, value, startIndex, count) { | |
var endIndex = startIndex - count + 1; | |
for (var i = startIndex; i >= endIndex; i--) { | |
if (array[i] == value) | |
return i; | |
} | |
return -1; | |
}; | |
$p.System$Collections$Generic$IEqualityComparer$1$Equals = $p.Equals$1; | |
$p.System$Collections$Generic$IEqualityComparer$1$GetHashCode = $p.GetHashCode$1; | |
}); | |
System.Collections.Generic.ISet$1 = $d.declare("System.Collections.Generic.ISet`1", null, 322, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.ICollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["UnionWith", null, 6], ["IntersectWith", null, 6], ["ExceptWith", null, 6], ["SymmetricExceptWith", null, 6], ["IsSubsetOf", null, 6], ["IsSupersetOf", null, 6], ["IsProperSupersetOf", null, 6], ["IsProperSubsetOf", null, 6], ["Overlaps", null, 6], ["SetEquals", null, 6]]]; }; | |
}, ["T"]); | |
System.Collections.Generic.HashSet$1 = $d.declare("System.Collections.Generic.HashSet`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.ISet$1(T), System.Collections.Generic.ICollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Count", p.get_Count, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["Clear", p.Clear, 6], ["Contains", p.Contains, 6], ["CopyTo", p.CopyTo$1, 6], ["Remove", p.Remove, 6], ["Add", p.Add, 6], ["UnionWith", p.UnionWith, 6], ["IntersectWith", p.IntersectWith, 6], ["ExceptWith", p.ExceptWith, 6], ["SymmetricExceptWith", p.SymmetricExceptWith, 6], ["IsSubsetOf", p.IsSubsetOf, 6], ["IsSupersetOf", p.IsSupersetOf, 6], ["IsProperSupersetOf", p.IsProperSupersetOf, 6], ["IsProperSubsetOf", p.IsProperSubsetOf, 6], ["Overlaps", p.Overlaps, 6], ["SetEquals", p.SetEquals, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6]], [["Count", 45, 0], ["SyncRoot", 1, 1], ["IsSynchronized", 39, 2], ["IsReadOnly", 39, 5]]]; }; | |
$t.$ator = function() { | |
this.storage = null; | |
}; | |
$t.ctor = function HashSet$1() { | |
$t.$baseType.ctor.call(this); | |
this.storage = new (System.Collections.Generic.Dictionary$2(T, T).ctor)(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function HashSet$1(source) { | |
$t.ctor.call(this); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
this.Add(item); | |
} | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function HashSet$1(comparer) { | |
$t.$baseType.ctor.call(this); | |
if (comparer == null) | |
comparer = System.Collections.Generic.EqualityComparer$1(T).get_Default(); | |
this.storage = new (System.Collections.Generic.Dictionary$2(T, T).ctor$2)(comparer); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function HashSet$1(collection, comparer) { | |
$t.ctor$2.call(this, comparer); | |
if (collection == null) | |
throw new System.ArgumentNullException.ctor$1("collection"); | |
var $iter = collection; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
this.Add(item); | |
} | |
}; | |
$t.ctor$3.prototype = $p; | |
$p.System$Collections$IEnumerable$GetEnumerator = function HashSet$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.get_Count = function HashSet$1_get_Count() { | |
return this.storage.get_Count(); | |
}; | |
$p.get_SyncRoot = function HashSet$1_get_SyncRoot() { | |
return this; | |
}; | |
$p.get_IsSynchronized = function HashSet$1_get_IsSynchronized() { | |
return true; | |
}; | |
$p.CopyTo = function HashSet$1_CopyTo(array, index) { | |
var i = 0; | |
var $iter = this; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
array[i++] = item; | |
} | |
}; | |
$p.GetEnumerator = function HashSet$1_GetEnumerator() { | |
return this.storage.get_Keys().System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.get_IsReadOnly = function HashSet$1_get_IsReadOnly() { | |
return false; | |
}; | |
$p.System$Collections$Generic$ICollection$1$Add = function HashSet$1_System_Collections_Generic_ICollection$T$_Add(item) { | |
this.storage.set_Item(item, item); | |
}; | |
$p.Clear = function HashSet$1_Clear() { | |
this.storage.Clear(); | |
}; | |
$p.Contains = function HashSet$1_Contains(item) { | |
return this.storage.ContainsKey(item); | |
}; | |
$p.CopyTo$1 = function HashSet$1_CopyTo(array, arrayIndex) { | |
var i = 0; | |
var $iter = this; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
array[i++] = item; | |
} | |
}; | |
$p.Remove = function HashSet$1_Remove(item) { | |
return this.storage.Remove(item); | |
}; | |
$p.Add = function HashSet$1_Add(item) { | |
if (!this.storage.ContainsKey(item)) { | |
this.storage.set_Item(item, item); | |
return true; | |
} | |
return false; | |
}; | |
$p.UnionWith = function HashSet$1_UnionWith(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.IntersectWith = function HashSet$1_IntersectWith(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.ExceptWith = function HashSet$1_ExceptWith(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.SymmetricExceptWith = function HashSet$1_SymmetricExceptWith(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.IsSubsetOf = function HashSet$1_IsSubsetOf(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.IsSupersetOf = function HashSet$1_IsSupersetOf(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.IsProperSupersetOf = function HashSet$1_IsProperSupersetOf(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.IsProperSubsetOf = function HashSet$1_IsProperSubsetOf(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.Overlaps = function HashSet$1_Overlaps(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.SetEquals = function HashSet$1_SetEquals(other) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$Generic$ISet$1$UnionWith = $p.UnionWith; | |
$p.System$Collections$Generic$ISet$1$IntersectWith = $p.IntersectWith; | |
$p.System$Collections$Generic$ISet$1$ExceptWith = $p.ExceptWith; | |
$p.System$Collections$Generic$ISet$1$SymmetricExceptWith = $p.SymmetricExceptWith; | |
$p.System$Collections$Generic$ISet$1$IsSubsetOf = $p.IsSubsetOf; | |
$p.System$Collections$Generic$ISet$1$IsSupersetOf = $p.IsSupersetOf; | |
$p.System$Collections$Generic$ISet$1$IsProperSupersetOf = $p.IsProperSupersetOf; | |
$p.System$Collections$Generic$ISet$1$IsProperSubsetOf = $p.IsProperSubsetOf; | |
$p.System$Collections$Generic$ISet$1$Overlaps = $p.Overlaps; | |
$p.System$Collections$Generic$ISet$1$SetEquals = $p.SetEquals; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$Generic$ICollection$1$Clear = $p.Clear; | |
$p.System$Collections$Generic$ICollection$1$Contains = $p.Contains; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo$1; | |
$p.System$Collections$Generic$ICollection$1$Remove = $p.Remove; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["T"]); | |
System.Collections.Generic.KeyNotFoundException = $d.declare("System.Collections.Generic.KeyNotFoundException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function KeyNotFoundException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function KeyNotFoundException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function KeyNotFoundException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.Collections.Generic.KeyValuePair$2 = $d.declare("System.Collections.Generic.KeyValuePair`2", null, 318, $asm, function($t, $p, TKey, TValue) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Key", p.get_Key, 6], ["get_Value", p.get_Value, 6], ["ToString", p.ToString, 6]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6]], [["Key", TKey, 0], ["Value", TValue, 1]]]; }; | |
$t.ctor = function KeyValuePair$2() { | |
this.key = $d.default(TKey); | |
this.value = $d.default(TValue); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Key = function KeyValuePair$2_get_Key() { | |
return this.key; | |
}; | |
$p.get_Value = function KeyValuePair$2_get_Value() { | |
return this.value; | |
}; | |
$t.ctor$1 = function KeyValuePair$2(key, value) { | |
this.key = key; | |
this.value = value; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.ToString = function KeyValuePair$2_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$2(91 /*'['*/); | |
if (this.get_Key() != null) | |
sb.Append$12(this.get_Key().toString()); | |
sb.Append$12(", "); | |
if (this.get_Value() != null) | |
sb.Append$12(this.get_Value().toString()); | |
sb.Append$2(93 /*']'*/); | |
return sb.toString(); | |
}; | |
}, ["TKey", "TValue"]); | |
System.Collections.Generic.Queue$1 = $d.declare("System.Collections.Generic.Queue`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(T), System.Collections.ICollection, System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Clear", p.Clear, 6], ["Contains", p.Contains, 6], ["Enqueue", p.Enqueue, 6], ["Dequeue", p.Dequeue, 6], ["Peek", p.Peek, 6], ["get_Count", p.get_Count, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6]], [["ctor", t.ctor, 6], ["ctor$2", t.ctor$2, 6], ["ctor$1", t.ctor$1, 6]], [["Count", 45, 5], ["SyncRoot", 1, 7], ["IsSynchronized", 39, 8]]]; }; | |
$t.$ator = function() { | |
this.storage = null; | |
}; | |
$t.ctor = function Queue$1() { | |
$t.$baseType.ctor.call(this); | |
this.storage = new Array(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$2 = function Queue$1(capacity) { | |
$t.ctor.call(this); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$1 = function Queue$1(collection) { | |
$t.$baseType.ctor.call(this); | |
this.storage = System.Linq.Enumerable.ToJsArray(T, collection); | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Clear = function Queue$1_Clear() { | |
this.storage.length = 0; | |
}; | |
$p.Contains = function Queue$1_Contains(item) { | |
return Array.IndexOf$3(T, this.storage, item) != -1; | |
}; | |
$p.Enqueue = function Queue$1_Enqueue(item) { | |
this.storage.push(item); | |
}; | |
$p.Dequeue = function Queue$1_Dequeue() { | |
return this.storage.shift(); | |
}; | |
$p.Peek = function Queue$1_Peek() { | |
if (this.storage.length == 0) | |
throw new System.InvalidOperationException.ctor(); | |
return this.storage[0]; | |
}; | |
$p.get_Count = function Queue$1_get_Count() { | |
return this.storage.length; | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function Queue$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function Queue$1_GetEnumerator() { | |
return this.GetEnumerable().System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.GetEnumerable = function Queue$1_GetEnumerable() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(T).ctor)(); | |
var i = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
i = 0; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i < this.storage.length) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
$state = 5; | |
$stateMachine.set_Current(this.storage[i]); | |
return true; | |
case 4: | |
i++; | |
$state = 1; | |
continue $top; | |
case 5: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.get_SyncRoot = function Queue$1_get_SyncRoot() { | |
return this; | |
}; | |
$p.get_IsSynchronized = function Queue$1_get_IsSynchronized() { | |
return true; | |
}; | |
$p.CopyTo = function Queue$1_CopyTo(array, index) { | |
for (var i = 0, j = index; index < array.length && i < this.storage.length; i++, j++) { | |
array[j] = this.storage[i]; | |
} | |
}; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$ICollection$get_SyncRoot = $p.get_SyncRoot; | |
$p.System$Collections$ICollection$get_IsSynchronized = $p.get_IsSynchronized; | |
$p.System$Collections$ICollection$CopyTo = $p.CopyTo; | |
}, ["T"]); | |
System.Collections.IDictionaryEnumerator = $d.declare("System.Collections.IDictionaryEnumerator", null, 66, $asm, function($t, $p) { | |
$t.$intfs = [System.Collections.IEnumerator]; | |
$t.$typeInfo = function(t, p) { return [161, null, null, null, [["Key", 1], ["Value", 1], ["Entry", System.Collections.DictionaryEntry]]]; }; | |
}); | |
System.Collections.Generic.List$1 = $d.declare("System.Collections.Generic.List`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IList$1(T), System.Collections.Generic.ICollection$1(T), System.Collections.Generic.IReadOnlyList$1(T), System.Collections.Generic.IReadOnlyCollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Capacity", p.get_Capacity, 6], ["set_Capacity", p.set_Capacity, 6], ["get_Count", p.get_Count, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["CopyTo", p.CopyTo, 6], ["get_IsReadOnly", p.get_IsReadOnly, 6], ["get_IsFixedSize", p.get_IsFixedSize, 6], ["AddRange", p.AddRange, 6], ["Clear", p.Clear, 6], ["IndexOf", p.IndexOf$1, 6], ["IndexOf", p.IndexOf$2, 6], ["LastIndexOf", p.LastIndexOf, 6], ["LastIndexOf", p.LastIndexOf$1, 6], ["LastIndexOf", p.LastIndexOf$2, 6], ["RemoveAt", p.RemoveAt, 6], ["RemoveRange", p.RemoveRange, 6], ["GetEnumerator", p.GetEnumerator, 6], ["Add", p.Add, 6], ["Contains", p.Contains, 6], ["CopyTo", p.CopyTo$1, 6], ["Remove", p.Remove, 6], ["get_Item", p.get_Item, 6], ["set_Item", p.set_Item, 6], ["IndexOf", p.IndexOf, 6], ["Insert", p.Insert, 6], ["Exists", p.Exists, 6], ["Find", p.Find, 6], ["FindAll", p.FindAll, 6], ["FindLast", p.FindLast, 6], ["FindIndex", p.FindIndex, 6], ["FindIndex", p.FindIndex$1, 6], ["FindIndex", p.FindIndex$2, 6], ["FindLastIndex", p.FindLastIndex, 6], ["FindLastIndex", p.FindLastIndex$1, 6], ["FindLastIndex", p.FindLastIndex$2, 6], ["Reverse", p.Reverse, 6], ["Reverse", p.Reverse$1, 6], ["Sort", p.Sort, 6], ["Sort", p.Sort$1, 6], ["Sort", p.Sort$2, 6], ["ToArray", p.ToArray, 6], ["BinarySearch", p.BinarySearch$2, 6], ["BinarySearch", p.BinarySearch, 6], ["BinarySearch", p.BinarySearch$1, 6], ["ForEach", p.ForEach, 6], ["GetRange", p.GetRange, 6], ["RemoveAll", p.RemoveAll, 6], ["TrueForAll", p.TrueForAll, 6], ["TrimExcess", p.TrimExcess, 6]], [["ctor", t.ctor, 6], ["ctor$2", t.ctor$2, 6], ["ctor$1", t.ctor$1, 6]], [["Capacity", 45, 0, 1], ["Count", 45, 2], ["IsSynchronized", 39, 3], ["SyncRoot", 1, 4], ["IsReadOnly", 39, 6], ["IsFixedSize", 39, 7], ["this[]", T, 22, 23, [["index", 45, 0]]]]]; }; | |
$t.$ator = function() { | |
this.storage = null; | |
}; | |
$t.ctor = function List$1() { | |
$t.$baseType.ctor.call(this); | |
this.storage = new Array(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$2 = function List$1(capacity) { | |
$t.ctor.call(this); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$1 = function List$1(collection) { | |
$t.$baseType.ctor.call(this); | |
this.storage = System.Linq.Enumerable.ToJsArray(T, collection); | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.get_Capacity = function List$1_get_Capacity() { | |
return this.storage.length; | |
}; | |
$p.set_Capacity = function List$1_set_Capacity(value) { | |
return value; | |
}; | |
$p.get_Count = function List$1_get_Count() { | |
return this.storage.length; | |
}; | |
$p.get_IsSynchronized = function List$1_get_IsSynchronized() { | |
return true; | |
}; | |
$p.get_SyncRoot = function List$1_get_SyncRoot() { | |
return this; | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function List$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.CopyTo = function List$1_CopyTo(array, index) { | |
for (var i = index; i < array.length; i++) { | |
array[i] = this.get_Item(i - index); | |
} | |
}; | |
$p.get_IsReadOnly = function List$1_get_IsReadOnly() { | |
return false; | |
}; | |
$p.get_IsFixedSize = function List$1_get_IsFixedSize() { | |
return false; | |
}; | |
$p.AddRange = function List$1_AddRange(collection) { | |
if ($d.is(collection, Array)) { | |
this.storage = this.storage.concat(Array.prototype.slice.call(collection)); | |
} | |
else | |
if ($d.is(collection, System.Collections.Generic.List$1(T))) { | |
this.storage = this.storage.concat(collection.storage); | |
} | |
else { | |
var $iter = collection; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
this.Add(item); | |
} | |
} | |
}; | |
$p.Clear = function List$1_Clear() { | |
this.storage.length = 0; | |
}; | |
$p.IndexOf$1 = function List$1_IndexOf(item, index) { | |
if (index > this.get_Count()) | |
throw new System.IndexOutOfRangeException.ctor$1("index"); | |
return Array.IndexOf$4(T, this.storage, item, index); | |
}; | |
$p.IndexOf$2 = function List$1_IndexOf(item, index, count) { | |
if (index > this.get_Count()) | |
throw new System.IndexOutOfRangeException.ctor$1("index"); | |
if (count < 0 || index > this.get_Count() - count) | |
throw new System.IndexOutOfRangeException.ctor$1("count"); | |
return Array.IndexOf$5(T, this.storage, item, index, count); | |
}; | |
$p.LastIndexOf = function List$1_LastIndexOf(item) { | |
return Array.LastIndexOf$3(T, this.storage, item); | |
}; | |
$p.LastIndexOf$1 = function List$1_LastIndexOf(item, index) { | |
if (index > this.get_Count()) | |
throw new System.IndexOutOfRangeException.ctor$1("index"); | |
return Array.LastIndexOf$4(T, this.storage, item, index); | |
}; | |
$p.LastIndexOf$2 = function List$1_LastIndexOf(item, index, count) { | |
if (index > this.get_Count()) | |
throw new System.IndexOutOfRangeException.ctor$1("index"); | |
if (count < 0 || index > this.get_Count() - count) | |
throw new System.IndexOutOfRangeException.ctor$1("count"); | |
return Array.LastIndexOf$5(T, this.storage, item, index, count); | |
}; | |
$p.RemoveAt = function List$1_RemoveAt(index) { | |
this.storage.splice(index, 1); | |
}; | |
$p.RemoveRange = function List$1_RemoveRange(index, count) { | |
this.storage.splice(index, count); | |
}; | |
$p.GetEnumerator = function List$1_GetEnumerator() { | |
return new (System.Collections.Generic.List$1.ListEnumerator(T).ctor)(this); | |
}; | |
$p.Add = function List$1_Add(item) { | |
this.storage.push(item); | |
}; | |
$p.Contains = function List$1_Contains(item) { | |
return Array.IndexOf$3(T, this.storage, item) != -1; | |
}; | |
$p.CopyTo$1 = function List$1_CopyTo(array, arrayIndex) { | |
for (var i = arrayIndex; i < array.length; i++) { | |
array[i] = this.get_Item(i - arrayIndex); | |
} | |
}; | |
$p.Remove = function List$1_Remove(item) { | |
var index = this.IndexOf(item); | |
if (index >= 0) { | |
this.RemoveAt(index); | |
return true; | |
} | |
return false; | |
}; | |
$p.get_Item = function List$1_get_Item(index) { | |
return this.storage[index]; | |
}; | |
$p.set_Item = function List$1_set_Item(index, value) { | |
this.storage[index] = value; | |
}; | |
$p.IndexOf = function List$1_IndexOf(item) { | |
return Array.IndexOf$3(T, this.storage, item); | |
}; | |
$p.Insert = function List$1_Insert(index, item) { | |
this.storage.splice(index, 0, item); | |
}; | |
$p.Exists = function List$1_Exists(match) { | |
return this.FindIndex(match) != -1; | |
}; | |
$p.Find = function List$1_Find(match) { | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
for (var i = 0; i < this.storage.length; i++) { | |
if (match(this.storage[i])) | |
return this.storage[i]; | |
} | |
return $d.default(T); | |
}; | |
$p.FindAll = function List$1_FindAll(match) { | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match"); | |
} | |
var list = new (System.Collections.Generic.List$1(T).ctor)(); | |
for (var i = 0; i < this.storage.length; i++) { | |
if (match(this.storage[i])) | |
list.Add(this.storage[i]); | |
} | |
return list; | |
}; | |
$p.FindLast = function List$1_FindLast(match) { | |
if (match == null) | |
throw new System.ArgumentNullException.ctor$1("match"); | |
for (var i = this.storage.length - 1; i >= 0; i--) { | |
if (match(this.storage[i])) | |
return this.storage[i]; | |
} | |
return $d.default(T); | |
}; | |
$p.FindIndex = function List$1_FindIndex(match) { | |
return this.FindIndex$2(0, this.storage.length, match); | |
}; | |
$p.FindIndex$1 = function List$1_FindIndex(startIndex, match) { | |
return this.FindIndex$2(startIndex, this.storage.length - startIndex, match); | |
}; | |
$p.FindIndex$2 = function List$1_FindIndex(startIndex, count, match) { | |
if (startIndex > this.storage.length) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("FindIndex: startIndex out of range"); | |
} | |
if (count < 0 || startIndex > this.storage.length - count) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("FindIndex: count out of range"); | |
} | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match is null"); | |
} | |
var endIndex = startIndex + count; | |
for (var i = startIndex; i < endIndex; i++) { | |
if (match(this.storage[i])) | |
return i; | |
} | |
return -1; | |
}; | |
$p.FindLastIndex = function List$1_FindLastIndex(match) { | |
return this.FindLastIndex$2(this.storage.length - 1, this.storage.length, match); | |
}; | |
$p.FindLastIndex$1 = function List$1_FindLastIndex(startIndex, match) { | |
return this.FindLastIndex$2(startIndex, startIndex + 1, match); | |
}; | |
$p.FindLastIndex$2 = function List$1_FindLastIndex(startIndex, count, match) { | |
if (match == null) { | |
throw new System.ArgumentNullException.ctor$1("match is null"); | |
} | |
if (this.storage.length == 0) { | |
if (startIndex != -1) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
} | |
} | |
else { | |
if ($d.toUInt32(startIndex) >= $d.toUInt32(this.storage.length)) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
} | |
} | |
if (count < 0 || startIndex - count + 1 < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
} | |
var endIndex = startIndex - count; | |
for (var i = startIndex; i > endIndex; i--) { | |
if (match(this.storage[i])) | |
return i; | |
} | |
return -1; | |
}; | |
$p.Reverse = function List$1_Reverse() { | |
this.Reverse$1(0, this.get_Count()); | |
}; | |
$p.Reverse$1 = function List$1_Reverse(index, count) { | |
if (index < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$1("index"); | |
if (count < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
if (this.storage.length - index < count) | |
throw new System.Exception.ctor$1("Argument_InvalidOffLen"); | |
Array.Reverse$1(this.storage, index, count); | |
}; | |
$p.Sort = function List$1_Sort() { | |
this.Sort$1(System.Collections.Generic.Comparer$1(T).get_Default()); | |
}; | |
$p.Sort$1 = function List$1_Sort(comparer) { | |
if (comparer == null) | |
throw new System.ArgumentNullException.ctor$1("comparer"); | |
if (this.get_Count() <= 0) | |
return; | |
this.storage.sort(function(x, y) { | |
return comparer.System$Collections$Generic$IComparer$1$Compare(x, y); | |
}); | |
}; | |
$p.Sort$2 = function List$1_Sort(comparison) { | |
if (comparison == null) | |
throw new System.ArgumentNullException.ctor$1("comparison"); | |
this.Sort$1(new (System.Collections.Generic.ComparisonComparer$1(T).ctor)(comparison)); | |
}; | |
$p.ToArray = function List$1_ToArray() { | |
var result = $d.array(T, this.storage.length); | |
Array.Copy$2(this.storage, 0, result, 0, this.storage.length); | |
return result; | |
}; | |
$p.BinarySearch$2 = function List$1_BinarySearch(index, count, item, comparer) { | |
return Array.BinarySearch$3(T, this.storage, index, count, item, comparer); | |
}; | |
$p.BinarySearch = function List$1_BinarySearch(item) { | |
return this.BinarySearch$2(0, this.get_Count(), item, null); | |
}; | |
$p.BinarySearch$1 = function List$1_BinarySearch(item, comparer) { | |
return this.BinarySearch$2(0, this.get_Count(), item, comparer); | |
}; | |
$p.ForEach = function List$1_ForEach(action) { | |
if (action == null) | |
throw new System.ArgumentNullException.ctor$1("action"); | |
for (var i = 0; i < this.storage.length; i++) { | |
action(this.storage[i]); | |
} | |
}; | |
$p.GetRange = function List$1_GetRange(index, count) { | |
var result = (function() { | |
var $obj = new (System.Collections.Generic.List$1(T).ctor)(); | |
$obj.storage = this.storage.slice(index, index + count); | |
return $obj; | |
}).call(this); | |
return result; | |
}; | |
$p.RemoveAll = function List$1_RemoveAll(match) { | |
var oldCount = this.storage.length; | |
this.storage = this.storage.filter(function(item, index, array) { | |
return !match(item); | |
}); | |
return oldCount - this.storage.length; | |
}; | |
$p.TrueForAll = function List$1_TrueForAll(match) { | |
if (match == null) | |
throw new System.ArgumentNullException.ctor$1("match"); | |
for (var i = 0; i < this.storage.length; i++) { | |
if (!match(this.storage[i])) | |
return false; | |
} | |
return true; | |
}; | |
$p.TrimExcess = function List$1_TrimExcess() { | |
return; | |
}; | |
$t.IsCompatibleObject = function List$1_IsCompatibleObject(value) { | |
return ($d.is(value, T)) || (value == null && $d.default(T) == null); | |
}; | |
$p.System$Collections$IList$get_Item = function List$1_System$Collections$IList$get_Item(index) { | |
return this.get_Item(index); | |
}; | |
$p.System$Collections$IList$set_Item = function List$1_System$Collections$IList$set_Item(index, value) { | |
this.set_Item(index, $d.cast(value, T)); | |
}; | |
$p.System$Collections$IList$Add = function List$1_System_Collections_IList_Add(value) { | |
this.storage.push($d.cast(value, T)); | |
return this.storage.length - 1; | |
}; | |
$p.System$Collections$IList$Contains = function List$1_System_Collections_IList_Contains(value) { | |
return $t.IsCompatibleObject(value) && this.Contains(value); | |
}; | |
$p.System$Collections$IList$IndexOf = function List$1_System_Collections_IList_IndexOf(value) { | |
if ($t.IsCompatibleObject(value)) { | |
return this.IndexOf(value); | |
} | |
return -1; | |
}; | |
$p.System$Collections$IList$Insert = function List$1_System_Collections_IList_Insert(index, value) { | |
this.Insert(index, $d.cast(value, T)); | |
}; | |
$p.System$Collections$IList$Remove = function List$1_System_Collections_IList_Remove(value) { | |
if ($t.IsCompatibleObject(value)) { | |
this.Remove(value); | |
} | |
}; | |
$p.System$Collections$Generic$IList$1$get_Item = $p.get_Item; | |
$p.System$Collections$Generic$IList$1$set_Item = $p.set_Item; | |
$p.System$Collections$Generic$IList$1$IndexOf = $p.IndexOf; | |
$p.System$Collections$Generic$IList$1$Insert = $p.Insert; | |
$p.System$Collections$Generic$IList$1$RemoveAt = $p.RemoveAt; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$Generic$ICollection$1$Add = $p.Add; | |
$p.System$Collections$Generic$ICollection$1$Clear = $p.Clear; | |
$p.System$Collections$Generic$ICollection$1$Contains = $p.Contains; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo$1; | |
$p.System$Collections$Generic$ICollection$1$Remove = $p.Remove; | |
$p.System$Collections$Generic$IReadOnlyList$1$get_Item = $p.get_Item; | |
$p.System$Collections$Generic$IReadOnlyCollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
$p.System$Collections$IList$get_IsReadOnly = $p.get_IsReadOnly; | |
$p.System$Collections$IList$get_IsFixedSize = $p.get_IsFixedSize; | |
$p.System$Collections$IList$Clear = $p.Clear; | |
$p.System$Collections$IList$RemoveAt = $p.RemoveAt; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$ICollection$get_SyncRoot = $p.get_SyncRoot; | |
$p.System$Collections$ICollection$get_IsSynchronized = $p.get_IsSynchronized; | |
$p.System$Collections$ICollection$CopyTo = $p.CopyTo; | |
}, ["T"]); | |
System.Collections.Generic.List$1.ListEnumerator = $d.declare("ListEnumerator", System.Object, 256, System.Collections.Generic.List$1, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerator$1(T), System.IDisposable, System.Collections.IEnumerator]; }; | |
$t.$typeInfo = function(t, p) { return [3, null, [["MoveNext", p.MoveNext, 6], ["Reset", p.Reset, 6], ["get_Current", p.get_Current, 6]], [["ctor", t.ctor, 6]], [["Current", T, 2]]]; }; | |
$t.$ator = function() { | |
this.index = -1; | |
this.list = null; | |
}; | |
$t.ctor = function ListEnumerator(list) { | |
$t.$baseType.ctor.call(this); | |
this.list = list; | |
}; | |
$t.ctor.prototype = $p; | |
$p.System$IDisposable$Dispose = function ListEnumerator_System_IDisposable_Dispose() {}; | |
$p.System$Collections$IEnumerator$get_Current = function ListEnumerator_System$Collections$IEnumerator$get_Current() { | |
return this.get_Current(); | |
}; | |
$p.MoveNext = function ListEnumerator_MoveNext() { | |
this.index++; | |
return this.index < this.list.get_Count(); | |
}; | |
$p.Reset = function ListEnumerator_Reset() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_Current = function ListEnumerator_get_Current() { | |
return this.list.get_Item(this.index); | |
}; | |
$p.System$Collections$Generic$IEnumerator$1$get_Current = $p.get_Current; | |
$p.System$Collections$IEnumerator$MoveNext = $p.MoveNext; | |
$p.System$Collections$IEnumerator$Reset = $p.Reset; | |
}, ["T"]); | |
System.Collections.IStructuralComparable = $d.declare("System.Collections.IStructuralComparable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["CompareTo", null, 6]]]; }; | |
}); | |
System.Collections.IStructuralEquatable = $d.declare("System.Collections.IStructuralEquatable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Equals", null, 6], ["GetHashCode", null, 6]]]; }; | |
}); | |
System.Collections.Generic.Stack$1 = $d.declare("System.Collections.Generic.Stack`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(T), System.Collections.ICollection, System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Clear", p.Clear, 6], ["Contains", p.Contains, 6], ["Push", p.Push, 6], ["Pop", p.Pop, 6], ["Peek", p.Peek, 6], ["get_Count", p.get_Count, 6], ["GetEnumerator", p.GetEnumerator, 6], ["get_SyncRoot", p.get_SyncRoot, 6], ["get_IsSynchronized", p.get_IsSynchronized, 6], ["CopyTo", p.CopyTo, 6]], [["ctor", t.ctor, 6], ["ctor$2", t.ctor$2, 6], ["ctor$1", t.ctor$1, 6]], [["Count", 45, 5], ["SyncRoot", 1, 7], ["IsSynchronized", 39, 8]]]; }; | |
$t.$ator = function() { | |
this.storage = null; | |
}; | |
$t.ctor = function Stack$1() { | |
$t.$baseType.ctor.call(this); | |
this.storage = new Array(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$2 = function Stack$1(capacity) { | |
$t.ctor.call(this); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$1 = function Stack$1(collection) { | |
$t.$baseType.ctor.call(this); | |
this.storage = System.Linq.Enumerable.ToJsArray(T, collection); | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Clear = function Stack$1_Clear() { | |
this.storage.length = 0; | |
}; | |
$p.Contains = function Stack$1_Contains(item) { | |
return Array.IndexOf$3(T, this.storage, item) != -1; | |
}; | |
$p.Push = function Stack$1_Push(item) { | |
this.storage.push(item); | |
}; | |
$p.Pop = function Stack$1_Pop() { | |
return this.storage.pop(); | |
}; | |
$p.Peek = function Stack$1_Peek() { | |
if (this.storage.length == 0) | |
throw new System.InvalidOperationException.ctor(); | |
return this.storage[this.storage.length - 1]; | |
}; | |
$p.get_Count = function Stack$1_get_Count() { | |
return this.storage.length; | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function Stack$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function Stack$1_GetEnumerator() { | |
return this.GetEnumerable().System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.GetEnumerable = function Stack$1_GetEnumerable() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(T).ctor)(); | |
var i = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
i = this.storage.length - 1; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i >= 0) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
$state = 5; | |
$stateMachine.set_Current(this.storage[i]); | |
return true; | |
case 4: | |
i--; | |
$state = 1; | |
continue $top; | |
case 5: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.get_SyncRoot = function Stack$1_get_SyncRoot() { | |
return this; | |
}; | |
$p.get_IsSynchronized = function Stack$1_get_IsSynchronized() { | |
return true; | |
}; | |
$p.CopyTo = function Stack$1_CopyTo(array, index) { | |
for (var i = this.storage.length - 1, j = index; index < array.length && i >= 0; i--, j++) { | |
array[j] = this.storage[i]; | |
} | |
}; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$ICollection$get_SyncRoot = $p.get_SyncRoot; | |
$p.System$Collections$ICollection$get_IsSynchronized = $p.get_IsSynchronized; | |
$p.System$Collections$ICollection$CopyTo = $p.CopyTo; | |
}, ["T"]); | |
System.Collections.ObjectModel.ReadOnlyCollection$1 = $d.declare("System.Collections.ObjectModel.ReadOnlyCollection`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IList$1(T), System.Collections.Generic.ICollection$1(T), System.Collections.IList, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList$1(T), System.Collections.Generic.IReadOnlyCollection$1(T), System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Count", p.get_Count, 6], ["get_Item", p.get_Item, 6], ["Contains", p.Contains, 6], ["CopyTo", p.CopyTo, 6], ["GetEnumerator", p.GetEnumerator, 6], ["IndexOf", p.IndexOf, 6], ["get_Items", p.get_Items, 4]], [["ctor", t.ctor, 6]], [["Count", 45, 0], ["this[]", T, 1, null, [["index", 45, 0]]], ["Items", System.Collections.Generic.IList$1(T), 6]]]; }; | |
$t.$ator = function() { | |
this.list = null; | |
}; | |
$t.ctor = function ReadOnlyCollection$1(list) { | |
$t.$baseType.ctor.call(this); | |
if (list == null) { | |
throw new System.ArgumentNullException.ctor$1("list"); | |
} | |
this.list = list; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ThrowNotSupportedException = function ReadOnlyCollection$1_ThrowNotSupportedException() { | |
throw new System.NotSupportedException.ctor$1("read-only collection"); | |
}; | |
$p.get_Count = function ReadOnlyCollection$1_get_Count() { | |
return this.list.System$Collections$Generic$ICollection$1$get_Count(); | |
}; | |
$p.get_Item = function ReadOnlyCollection$1_get_Item(index) { | |
return this.list.System$Collections$Generic$IList$1$get_Item(index); | |
}; | |
$p.Contains = function ReadOnlyCollection$1_Contains(value) { | |
return this.list.System$Collections$Generic$ICollection$1$Contains(value); | |
}; | |
$p.CopyTo = function ReadOnlyCollection$1_CopyTo(array, index) { | |
this.list.System$Collections$Generic$ICollection$1$CopyTo(array, index); | |
}; | |
$p.GetEnumerator = function ReadOnlyCollection$1_GetEnumerator() { | |
return this.list.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.IndexOf = function ReadOnlyCollection$1_IndexOf(value) { | |
return this.list.System$Collections$Generic$IList$1$IndexOf(value); | |
}; | |
$p.get_Items = function ReadOnlyCollection$1_get_Items() { | |
return this.list; | |
}; | |
$p.System$Collections$Generic$ICollection$1$get_IsReadOnly = function ReadOnlyCollection$1_System$Collections$Generic$ICollection$1$get_IsReadOnly() { | |
return true; | |
}; | |
$p.System$Collections$Generic$IList$1$get_Item = function ReadOnlyCollection$1_System$Collections$Generic$IList$1$get_Item(index) { | |
return this.list.System$Collections$Generic$IList$1$get_Item(index); | |
}; | |
$p.System$Collections$Generic$IList$1$set_Item = function ReadOnlyCollection$1_System$Collections$Generic$IList$1$set_Item(index, value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Add = function ReadOnlyCollection$1_System_Collections_Generic_ICollection$T$_Add(value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Clear = function ReadOnlyCollection$1_System_Collections_Generic_ICollection$T$_Clear() { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$Generic$IList$1$Insert = function ReadOnlyCollection$1_System_Collections_Generic_IList$T$_Insert(index, value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$Generic$ICollection$1$Remove = function ReadOnlyCollection$1_System_Collections_Generic_ICollection$T$_Remove(value) { | |
$t.ThrowNotSupportedException(); | |
return false; | |
}; | |
$p.System$Collections$Generic$IList$1$RemoveAt = function ReadOnlyCollection$1_System_Collections_Generic_IList$T$_RemoveAt(index) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function ReadOnlyCollection$1_System_Collections_IEnumerable_GetEnumerator() { | |
return ($d.cast(this.list, System.Collections.IEnumerable)).System$Collections$IEnumerable$GetEnumerator(); | |
}; | |
$p.System$Collections$ICollection$get_IsSynchronized = function ReadOnlyCollection$1_System$Collections$ICollection$get_IsSynchronized() { | |
return false; | |
}; | |
$p.System$Collections$ICollection$get_SyncRoot = function ReadOnlyCollection$1_System$Collections$ICollection$get_SyncRoot() { | |
return this; | |
}; | |
$p.System$Collections$ICollection$CopyTo = function ReadOnlyCollection$1_System_Collections_ICollection_CopyTo(array, index) { | |
var items = $d.as(array, $d.arrayType(T)); | |
if (items != null) { | |
this.list.System$Collections$Generic$ICollection$1$CopyTo(items, index); | |
} | |
else { | |
throw new System.NotImplementedException.ctor(); | |
} | |
}; | |
$p.System$Collections$IList$get_IsFixedSize = function ReadOnlyCollection$1_System$Collections$IList$get_IsFixedSize() { | |
return true; | |
}; | |
$p.System$Collections$IList$get_IsReadOnly = function ReadOnlyCollection$1_System$Collections$IList$get_IsReadOnly() { | |
return true; | |
}; | |
$p.System$Collections$IList$get_Item = function ReadOnlyCollection$1_System$Collections$IList$get_Item(index) { | |
return this.list.System$Collections$Generic$IList$1$get_Item(index); | |
}; | |
$p.System$Collections$IList$set_Item = function ReadOnlyCollection$1_System$Collections$IList$set_Item(index, value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$IList$Add = function ReadOnlyCollection$1_System_Collections_IList_Add(value) { | |
$t.ThrowNotSupportedException(); | |
return -1; | |
}; | |
$p.System$Collections$IList$Clear = function ReadOnlyCollection$1_System_Collections_IList_Clear() { | |
$t.ThrowNotSupportedException(); | |
}; | |
$t.IsCompatibleObject = function ReadOnlyCollection$1_IsCompatibleObject(value) { | |
return ($d.is(value, T)) || (value == null && $d.default(T) == null); | |
}; | |
$p.System$Collections$IList$Contains = function ReadOnlyCollection$1_System_Collections_IList_Contains(value) { | |
return $t.IsCompatibleObject(value) && this.Contains(value); | |
}; | |
$p.System$Collections$IList$IndexOf = function ReadOnlyCollection$1_System_Collections_IList_IndexOf(value) { | |
if ($t.IsCompatibleObject(value)) { | |
return this.IndexOf(value); | |
} | |
return -1; | |
}; | |
$p.System$Collections$IList$Insert = function ReadOnlyCollection$1_System_Collections_IList_Insert(index, value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$IList$Remove = function ReadOnlyCollection$1_System_Collections_IList_Remove(value) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$IList$RemoveAt = function ReadOnlyCollection$1_System_Collections_IList_RemoveAt(index) { | |
$t.ThrowNotSupportedException(); | |
}; | |
$p.System$Collections$Generic$IList$1$IndexOf = $p.IndexOf; | |
$p.System$Collections$Generic$ICollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$ICollection$1$Contains = $p.Contains; | |
$p.System$Collections$Generic$ICollection$1$CopyTo = $p.CopyTo; | |
$p.System$Collections$ICollection$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$IReadOnlyList$1$get_Item = $p.get_Item; | |
$p.System$Collections$Generic$IReadOnlyCollection$1$get_Count = $p.get_Count; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["T"]); | |
System.Console = $d.declare("System.Console", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Write", t.Write, 22], ["Write", t.Write$1, 22], ["Write", t.Write$2, 22], ["Write", t.Write$3, 22], ["Write", t.Write$4, 22], ["Write", t.Write$5, 22], ["Write", t.Write$6, 22], ["Write", t.Write$7, 22], ["Write", t.Write$8, 22], ["Write", t.Write$9, 22], ["Write", t.Write$10, 22], ["Write", t.Write$11, 22], ["Write", t.Write$12, 22], ["Write", t.Write$13, 22], ["Write", t.Write$14, 22], ["Write", t.Write$15, 22], ["Write", t.Write$16, 22], ["Write", t.Write$17, 22], ["WriteLine", t.WriteLine, 22], ["WriteLine", t.WriteLine$1, 22], ["WriteLine", t.WriteLine$2, 22], ["WriteLine", t.WriteLine$3, 22], ["WriteLine", t.WriteLine$4, 22], ["WriteLine", t.WriteLine$5, 22], ["WriteLine", t.WriteLine$6, 22], ["WriteLine", t.WriteLine$7, 22], ["WriteLine", t.WriteLine$8, 22], ["WriteLine", t.WriteLine$9, 22], ["WriteLine", t.WriteLine$10, 22], ["WriteLine", t.WriteLine$11, 22], ["WriteLine", t.WriteLine$12, 22], ["WriteLine", t.WriteLine$13, 22], ["WriteLine", t.WriteLine$14, 22], ["WriteLine", t.WriteLine$15, 22], ["WriteLine", t.WriteLine$16, 22], ["WriteLine", t.WriteLine$17, 22], ["WriteLine", t.WriteLine$18, 22]]]; }; | |
$t.cctor = function() { | |
$t.s_Line = new System.Text.StringBuilder.ctor(); | |
$t.s_DivConsole = typeof document != "undefined" ? document.getElementById("duocode-console") : null; | |
}; | |
$t.DivWrite = function Console_DivWrite(value) { | |
if ($t().s_DivConsole != null && value != null) { | |
value = value.Replace$1("\n", "<br/>"); | |
$t().s_DivConsole.innerHTML += value; | |
$t().s_DivConsole.scrollTop = $t().s_DivConsole.scrollHeight; | |
} | |
}; | |
$t.DoWrite = function Console_DoWrite(value) { | |
$t().s_Line.Append$12(value); | |
$t.DivWrite(value); | |
}; | |
$t.DoWriteLine = function Console_DoWriteLine(value) { | |
$t().s_Line.Append$12(value); | |
var output = $t().s_Line.toString(); | |
$t().s_Line.Clear(); | |
console.log(output); | |
$t.DivWrite(value + "\n"); | |
}; | |
$t.Write = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$1 = function Console_Write(value) { $t.DoWrite(String.fromCharCode(value)); }; | |
$t.Write$2 = function Console_Write(buffer) { $t.DoWrite(String.ctor(buffer)); }; | |
$t.Write$3 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$4 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$5 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$6 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$7 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$8 = function Console_Write(value) { if (value != null)$t.DoWrite(value.toString()); }; | |
$t.Write$9 = function Console_Write(value) { $t.DoWrite(value); }; | |
$t.Write$10 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$11 = function Console_Write(value) { $t.DoWrite(value.toString()); }; | |
$t.Write$12 = function Console_Write(format, arg0) { $t.DoWrite(String.Format(format, $d.array(System.Object, [arg0]))); }; | |
$t.Write$13 = function Console_Write(format, arg) { $t.DoWrite(String.Format(format, arg)); }; | |
$t.Write$14 = function Console_Write(buffer, index, count) { $t.DoWrite(String.ctor$3(buffer, index, count)); }; | |
$t.Write$15 = function Console_Write(format, arg0, arg1) { $t.DoWrite(String.Format(format, $d.array(System.Object, [arg0, arg1]))); }; | |
$t.Write$16 = function Console_Write(format, arg0, arg1, arg2) { $t.DoWrite(String.Format(format, $d.array(System.Object, [arg0, arg1, arg2]))); }; | |
$t.Write$17 = function Console_Write(format, arg0, arg1, arg2, arg3) { $t.DoWrite(String.Format(format, $d.array(System.Object, [arg0, arg1, arg2, arg3]))); }; | |
$t.WriteLine = function Console_WriteLine() { $t.DoWriteLine(""); }; | |
$t.WriteLine$1 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$2 = function Console_WriteLine(value) { $t.DoWriteLine(String.fromCharCode(value)); }; | |
$t.WriteLine$3 = function Console_WriteLine(buffer) { $t.DoWriteLine(String.ctor(buffer)); }; | |
$t.WriteLine$4 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$5 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$6 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$7 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$8 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$9 = function Console_WriteLine(value) { $t.DoWriteLine(value != null ? value.toString() : null); }; | |
$t.WriteLine$10 = function Console_WriteLine(value) { $t.DoWriteLine(value); }; | |
$t.WriteLine$11 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$12 = function Console_WriteLine(value) { $t.DoWriteLine(value.toString()); }; | |
$t.WriteLine$13 = function Console_WriteLine(format, arg0) { $t.DoWriteLine(String.Format(format, $d.array(System.Object, [arg0]))); }; | |
$t.WriteLine$14 = function Console_WriteLine(format, arg) { $t.DoWriteLine(String.Format(format, arg)); }; | |
$t.WriteLine$15 = function Console_WriteLine(buffer, index, count) { $t.DoWriteLine(String.ctor$3(buffer, index, count)); }; | |
$t.WriteLine$16 = function Console_WriteLine(format, arg0, arg1) { $t.DoWriteLine(String.Format(format, $d.array(System.Object, [arg0, arg1]))); }; | |
$t.WriteLine$17 = function Console_WriteLine(format, arg0, arg1, arg2) { $t.DoWriteLine(String.Format(format, $d.array(System.Object, [arg0, arg1, arg2]))); }; | |
$t.WriteLine$18 = function Console_WriteLine(format, arg0, arg1, arg2, arg3) { $t.DoWriteLine(String.Format(format, $d.array(System.Object, [arg0, arg1, arg2, arg3]))); }; | |
}); | |
System.Convert = $d.declare("System.Convert", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["ChangeType", t.ChangeType, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function Convert() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ChangeType = function Convert_ChangeType(value, conversionType) { | |
if (value == null) { | |
if (conversionType.get_IsValueType()) | |
throw new System.Exception.ctor$1("Null object cannot be converted to a value type"); | |
return null; | |
} | |
if ($d.getTypeFromInst(value) == conversionType) { | |
return value; | |
} | |
if ($d.is(value, String)) { | |
var s = $d.cast(value, String); | |
if (conversionType == $d.typeOf(System.Int32)) | |
return System.Int32.Parse(s); | |
if (conversionType == $d.typeOf(System.Int16)) | |
return System.Int16.Parse(s); | |
} | |
throw new System.Exception.ctor$1("Could not convert " + $d.toString(value) + " (" + $d.getTypeFromInst(value).get_FullName() + ") to " + conversionType.get_FullName()); | |
}; | |
}); | |
System.IConvertible = $d.declare("System.IConvertible", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetTypeCode", null, 6], ["ToBoolean", null, 6], ["ToChar", null, 6], ["ToSByte", null, 6], ["ToByte", null, 6], ["ToInt16", null, 6], ["ToUInt16", null, 6], ["ToInt32", null, 6], ["ToUInt32", null, 6], ["ToInt64", null, 6], ["ToUInt64", null, 6], ["ToSingle", null, 6], ["ToDouble", null, 6], ["ToDecimal", null, 6], ["ToDateTime", null, 6], ["ToString", null, 6], ["ToType", null, 6]]]; }; | |
}); | |
System.DateTime = $d.declare("System.DateTime", null, 57, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IFormattable, System.IConvertible, System.IComparable$1(System.DateTime), System.IEquatable$1(System.DateTime)]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 57, 54], ["MaxValue", 57, 54]], [["get_JsDate", p.get_JsDate, 6], ["get_Date", p.get_Date, 6], ["get_Day", p.get_Day, 6], ["get_DayOfWeek", p.get_DayOfWeek, 6], ["get_DayOfYear", p.get_DayOfYear, 6], ["get_Hour", p.get_Hour, 6], ["get_Kind", p.get_Kind, 6], ["get_Millisecond", p.get_Millisecond, 6], ["get_Minute", p.get_Minute, 6], ["get_Month", p.get_Month, 6], ["get_Now", t.get_Now, 22], ["get_UtcNow", t.get_UtcNow, 22], ["get_Second", p.get_Second, 6], ["get_Today", t.get_Today, 22], ["get_Year", p.get_Year, 6], ["SpecifyKind", t.SpecifyKind, 22], ["CompareTo", p.CompareTo, 6], ["CompareTo", p.CompareTo$1, 6], ["GetTypeCode", p.GetTypeCode, 6], ["Equals", p.Equals$1, 6], ["ToDateTime", p.ToDateTime, 6], ["ToString", p.ToString, 6], ["ToString", p.ToString$1, 6], ["ToString", p.ToString$2, 6], ["op_Subtraction", t.op_Subtraction, 22], ["Add", p.Add, 6], ["AddTicks", p.AddTicks, 6], ["AddYears", p.AddYears, 6], ["AddMonths", p.AddMonths, 6], ["AddDays", p.AddDays, 6], ["AddHours", p.AddHours, 6], ["AddMilliseconds", p.AddMilliseconds, 6], ["AddMinutes", p.AddMinutes, 6], ["AddSeconds", p.AddSeconds, 6]], [["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6], ["ctor$4", t.ctor$4, 6], ["ctor$5", t.ctor$5, 6], ["ctor$6", t.ctor$6, 6], ["ctor", t.ctor, 6]], [["JsDate", Date, 0], ["Date", 57, 1], ["Day", 45, 2], ["DayOfWeek", System.DayOfWeek, 3], ["DayOfYear", 45, 4], ["Hour", 45, 5], ["Kind", System.DateTimeKind, 6], ["Millisecond", 45, 7], ["Minute", 45, 8], ["Month", 45, 9], ["Now", 57, 10], ["UtcNow", 57, 11], ["Second", 45, 12], ["Today", 57, 13], ["Year", 45, 14]]]; }; | |
$t.cctor = function() { | |
$t.MinValue = new System.DateTime.ctor$1(new Date(-8640000000000000), 0); | |
$t.MaxValue = new System.DateTime.ctor$1(new Date(+8640000000000000), 0); | |
}; | |
$t.ctor = function DateTime(dummy) { | |
this.value = new Date(0); | |
this.kind = 0; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function DateTime(value, kind) { | |
this.value = value; | |
this.kind = kind; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.get_JsDate = function DateTime_get_JsDate() { | |
return this.value; | |
}; | |
$t.ctor$2 = function DateTime(year, month, day) { | |
$t.ctor$1.call(this, new Date(year, month - 1, day), 0); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function DateTime(year, month, day, hour, minute, second) { | |
$t.ctor$1.call(this, new Date(year, month - 1, day, hour, minute, second), 0); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$4 = function DateTime(year, month, day, hour, minute, second, kind) { | |
$t.ctor$1.call(this, new Date(year, month - 1, day, hour, minute, second), kind); | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.ctor$5 = function DateTime(year, month, day, hour, minute, second, millisecond) { | |
$t.ctor$1.call(this, new Date(year, month - 1, day, hour, minute, second, millisecond), 0); | |
}; | |
$t.ctor$5.prototype = $p; | |
$t.ctor$6 = function DateTime(year, month, day, hour, minute, second, millisecond, kind) { | |
$t.ctor$1.call(this, new Date(year, month - 1, day, hour, minute, second, millisecond), kind); | |
}; | |
$t.ctor$6.prototype = $p; | |
$p.get_Date = function DateTime_get_Date() { | |
var clone = new Date(this.value.getTime()); | |
clone.setHours(0); | |
clone.setMinutes(0); | |
clone.setSeconds(0); | |
clone.setMilliseconds(0); | |
return new System.DateTime.ctor$1(clone, this.kind); | |
}; | |
$p.get_Day = function DateTime_get_Day() { | |
return this.value.getDate(); | |
}; | |
$p.get_DayOfWeek = function DateTime_get_DayOfWeek() { | |
return this.value.getDay(); | |
}; | |
$p.get_DayOfYear = function DateTime_get_DayOfYear() { | |
var now = new Date(); | |
var start = new Date(now.getFullYear(), 0); | |
var diff = now - start; | |
var oneDay = 86400000; | |
var day = Math.ceil(diff / oneDay); | |
return day; | |
}; | |
$p.get_Hour = function DateTime_get_Hour() { | |
return this.value.getHours(); | |
}; | |
$p.get_Kind = function DateTime_get_Kind() { | |
return this.kind; | |
}; | |
$p.get_Millisecond = function DateTime_get_Millisecond() { | |
return this.value.getMilliseconds(); | |
}; | |
$p.get_Minute = function DateTime_get_Minute() { | |
return this.value.getMinutes(); | |
}; | |
$p.get_Month = function DateTime_get_Month() { | |
return this.value.getMonth() + 1; | |
}; | |
$t.get_Now = function DateTime_get_Now() { | |
return new System.DateTime.ctor$1(new Date(), 2); | |
}; | |
$t.get_UtcNow = function DateTime_get_UtcNow() { | |
var now = new Date(); | |
var utcNow = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), | |
now.getUTCMinutes(), now.getUTCSeconds(), now.getUTCMilliseconds()); | |
return new System.DateTime.ctor$1(utcNow, 1); | |
}; | |
$p.get_Second = function DateTime_get_Second() { | |
return this.value.getSeconds(); | |
}; | |
$t.get_Today = function DateTime_get_Today() { | |
return $t().get_Now().get_Date(); | |
}; | |
$p.get_Year = function DateTime_get_Year() { | |
return this.value.getFullYear(); | |
}; | |
$t.SpecifyKind = function DateTime_SpecifyKind(value, kind) { | |
return new System.DateTime.ctor$1(new Date(value.value.getTime()), kind); | |
}; | |
$p.CompareTo = function DateTime_CompareTo(other) { | |
return ((this.value.getTime() - other.value.getTime()) | 0); | |
}; | |
$p.CompareTo$1 = function DateTime_CompareTo(obj) { | |
if (!($d.is(obj, System.DateTime))) | |
return 1; | |
return this.CompareTo($d.cast(obj, System.DateTime)); | |
}; | |
$p.GetTypeCode = function DateTime_GetTypeCode() { | |
return 16; | |
}; | |
$p.Equals$1 = function DateTime_Equals(other) { | |
return this.value.getTime() == other.value.getTime(); | |
}; | |
$p.ToDateTime = function DateTime_ToDateTime(provider) { | |
return this; | |
}; | |
$p.ToString = function DateTime_ToString() { | |
return this.value.toString(); | |
}; | |
$p.ToString$1 = function DateTime_ToString(provider) { | |
return this.toString(); | |
}; | |
$p.ToString$2 = function DateTime_ToString(format, formatProvider) { | |
return this.toString(); | |
}; | |
$p.System$IConvertible$ToBoolean = function DateTime_System_IConvertible_ToBoolean(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Boolean'"); | |
}; | |
$p.System$IConvertible$ToChar = function DateTime_System_IConvertible_ToChar(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Char'"); | |
}; | |
$p.System$IConvertible$ToSByte = function DateTime_System_IConvertible_ToSByte(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'SByte'"); | |
}; | |
$p.System$IConvertible$ToByte = function DateTime_System_IConvertible_ToByte(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Byte'"); | |
}; | |
$p.System$IConvertible$ToInt16 = function DateTime_System_IConvertible_ToInt16(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Int16'"); | |
}; | |
$p.System$IConvertible$ToUInt16 = function DateTime_System_IConvertible_ToUInt16(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'UInt16'"); | |
}; | |
$p.System$IConvertible$ToInt32 = function DateTime_System_IConvertible_ToInt32(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Int32'"); | |
}; | |
$p.System$IConvertible$ToUInt32 = function DateTime_System_IConvertible_ToUInt32(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'UInt32'"); | |
}; | |
$p.System$IConvertible$ToInt64 = function DateTime_System_IConvertible_ToInt64(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Int64'"); | |
}; | |
$p.System$IConvertible$ToUInt64 = function DateTime_System_IConvertible_ToUInt64(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'UInt64'"); | |
}; | |
$p.System$IConvertible$ToSingle = function DateTime_System_IConvertible_ToSingle(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Single'"); | |
}; | |
$p.System$IConvertible$ToDouble = function DateTime_System_IConvertible_ToDouble(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Double'"); | |
}; | |
$p.System$IConvertible$ToDecimal = function DateTime_System_IConvertible_ToDecimal(provider) { | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to 'Decimal'"); | |
}; | |
$p.System$IConvertible$ToType = function DateTime_System_IConvertible_ToType(conversionType, provider) { | |
if (conversionType == $d.typeOf(System.DateTime)) | |
return this; | |
else | |
if (conversionType == $d.typeOf(String)) | |
return this.toString(); | |
else | |
throw new System.InvalidCastException.ctor("Invalid cast from 'DateTime' to '" + conversionType.get_Name() + "'"); | |
}; | |
$t.op_Subtraction = function DateTime_op_Subtraction(left, right) { | |
return System.TimeSpan.FromMilliseconds(left.value - right.value); | |
}; | |
$p.Add = function DateTime_Add(value) { | |
return this.AddTicks(value.ticks); | |
}; | |
$p.AddTicks = function DateTime_AddTicks(value) { | |
var milliseconds = (value / 10000 | 0); | |
var newDate = new Date(this.value.getTime()); | |
newDate.setMilliseconds(newDate.getMilliseconds() + (milliseconds | 0)); | |
return new System.DateTime.ctor$1(newDate, 0); | |
}; | |
$p.AddYears = function DateTime_AddYears(value) { | |
return this.AddMonths(value * 12); | |
}; | |
$p.AddMonths = function DateTime_AddMonths(months) { | |
var newDate = new Date(this.value.getTime()); | |
newDate.setMonth(newDate.getMonth() + months); | |
return new System.DateTime.ctor$1(newDate, 0); | |
}; | |
$p.AddDays = function DateTime_AddDays(value) { | |
return this.Add$1(value, 86400000); | |
}; | |
$p.AddHours = function DateTime_AddHours(value) { | |
return this.Add$1(value, 3600000); | |
}; | |
$p.AddMilliseconds = function DateTime_AddMilliseconds(value) { | |
return this.Add$1(value, 1); | |
}; | |
$p.AddMinutes = function DateTime_AddMinutes(value) { | |
return this.Add$1(value, 60000); | |
}; | |
$p.AddSeconds = function DateTime_AddSeconds(value) { | |
return this.Add$1(value, 1000); | |
}; | |
$p.Add$1 = function DateTime_Add(value, scale) { | |
var num = $d.toInt64((value * scale + (value >= 0 ? 0.5 : -0.5))); | |
return this.AddTicks(num * 10000); | |
}; | |
$p.System$IComparable$CompareTo = $p.CompareTo$1; | |
$p.System$IFormattable$ToString = $p.ToString$2; | |
$p.System$IConvertible$GetTypeCode = $p.GetTypeCode; | |
$p.System$IConvertible$ToDateTime = $p.ToDateTime; | |
$p.System$IConvertible$ToString = $p.ToString$1; | |
$p.System$IComparable$1$CompareTo = $p.CompareTo; | |
$p.System$IEquatable$1$Equals = $p.Equals$1; | |
}); | |
System.DateTimeKind = $d.declareEnum("System.DateTimeKind", 45, $asm, 257, ["Unspecified", "Utc", "Local"], [0, 1, 2]); | |
System.DayOfWeek = $d.declareEnum("System.DayOfWeek", 45, $asm, 257, ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], [0, 1, 2, 3, 4, 5, 6]); | |
System.Decimal = $d.declare("System.Decimal", Number, 49, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Decimal), System.IEquatable$1(System.Decimal)]; }; | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
}); | |
System.Diagnostics.Debug = $d.declare("System.Diagnostics.Debug", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Assert", t.Assert, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function Debug() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.Assert = function Debug_Assert(condition) { | |
if (!condition) | |
throw new System.Exception.ctor$1("Assertion failed"); | |
}; | |
}); | |
System.Diagnostics.Debugger = $d.declare("System.Diagnostics.Debugger", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["DefaultCategory", 20, 54]], [["Break", t.Break, 22], ["Launch", t.Launch, 22], ["get_IsAttached", t.get_IsAttached, 22], ["Log", t.Log, 22], ["IsLogging", t.IsLogging, 22]], null, [["IsAttached", 39, 2]]]; }; | |
$t.cctor = function() { | |
$t.DefaultCategory = null; | |
}; | |
$t.Break = function Debugger_Break() { | |
debugger; | |
}; | |
$t.Launch = function Debugger_Launch() { | |
debugger; | |
return true; | |
}; | |
$t.get_IsAttached = function Debugger_get_IsAttached() { | |
return true; | |
}; | |
$t.Log = function Debugger_Log(level, category, message) { | |
console.log(message); | |
}; | |
$t.IsLogging = function Debugger_IsLogging() { | |
return true; | |
}; | |
}); | |
System.Double = $d.declare("System.Double", Number, 51, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Double), System.IEquatable$1(System.Double), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 51, 86, -1.79769313486232E+308], ["MaxValue", 51, 86, 1.79769313486232E+308], ["Epsilon", 51, 86, 4.94065645841247E-324], ["NaN", 51, 86, NaN], ["NegativeInfinity", 51, 86, (-Infinity)], ["PositiveInfinity", 51, 86, Infinity]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22], ["IsNaN", t.IsNaN, 22], ["IsInfinity", t.IsInfinity, 22], ["IsNegativeInfinity", t.IsNegativeInfinity, 22], ["IsPositiveInfinity", t.IsPositiveInfinity, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = -1.79769313486232E+308; | |
$t.MaxValue = 1.79769313486232E+308; | |
$t.Epsilon = 4.94065645841247E-324; | |
$t.NaN = NaN; | |
$t.NegativeInfinity = (-Infinity); | |
$t.PositiveInfinity = Infinity; | |
$t.Parse = function Double_Parse(s) { return Number.Parse(System.Double, s); }; | |
$t.TryParse = function Double_TryParse(s, result) { return Number.TryParse(System.Double, s, result); }; | |
$t.IsNaN = function Double_IsNaN(d) { return isNaN(d); }; | |
$t.IsInfinity = function Double_IsInfinity(d) { return !isFinite(d); }; | |
$t.IsNegativeInfinity = function Double_IsNegativeInfinity(d) { return (d == (-Infinity)); }; | |
$t.IsPositiveInfinity = function Double_IsPositiveInfinity(d) { return (d == Infinity); }; | |
}); | |
System.Drawing.Bitmap = $d.declare("System.Drawing.Bitmap", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this.Image = null; | |
}; | |
$t.ctor = function Bitmap(image) { | |
$t.$baseType.ctor.call(this); | |
this.Image = image; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
DuoCode.Runtime.CompilerAttribute = $d.declare("DuoCode.Runtime.CompilerAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, [["Version", 20, 38]], null, [["ctor", t.ctor, 6]], null, null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);$obj.set_AllowMultiple(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.Version = null; | |
}; | |
$t.ctor = function CompilerAttribute(version) { | |
$t.$baseType.ctor.call(this); | |
this.Version = version; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Linq.Expressions.ExpressionVisitor = $d.declare("System.Linq.Expressions.ExpressionVisitor", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Visit", p.Visit$1, 6], ["Visit", p.Visit, 6], ["VisitArguments", p.VisitArguments, 3], ["Visit", t.Visit, 22], ["VisitAndConvert", p.VisitAndConvert$1, 6], ["VisitAndConvert", p.VisitAndConvert, 6], ["VisitBinary", p.VisitBinary, 5], ["VisitConditional", p.VisitConditional, 5], ["VisitConstant", p.VisitConstant, 5], ["VisitDefault", p.VisitDefault, 5], ["VisitInvocation", p.VisitInvocation, 5], ["VisitLambda", p.VisitLambda, 5], ["VisitMember", p.VisitMember, 5], ["VisitIndex", p.VisitIndex, 5], ["VisitMethodCall", p.VisitMethodCall, 5], ["VisitNewArray", p.VisitNewArray, 5], ["VisitNew", p.VisitNew, 5], ["VisitParameter", p.VisitParameter, 5], ["VisitTypeBinary", p.VisitTypeBinary, 5], ["VisitUnary", p.VisitUnary, 5], ["VisitMemberInit", p.VisitMemberInit, 5], ["VisitListInit", p.VisitListInit, 5], ["VisitElementInit", p.VisitElementInit, 4], ["VisitMemberBinding", p.VisitMemberBinding, 4], ["VisitMemberAssignment", p.VisitMemberAssignment, 4], ["VisitMemberMemberBinding", p.VisitMemberMemberBinding, 4], ["VisitMemberListBinding", p.VisitMemberListBinding, 4]], [["ctor", t.ctor, 4]]]; }; | |
$t.ctor = function ExpressionVisitor() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Visit$1 = function ExpressionVisitor_Visit(node) { | |
if (node != null) { | |
return node.Accept(this); | |
} | |
return null; | |
}; | |
$p.Visit = function ExpressionVisitor_Visit(nodes) { | |
var newNodes = null; | |
for (var i = 0, n = nodes.get_Count(); i < n; i++) { | |
var node = this.Visit$1(nodes.get_Item(i)); | |
if (newNodes != null) { | |
newNodes[i] = node; | |
} | |
else | |
if (!(node === nodes.get_Item(i))) { | |
newNodes = $d.array(System.Linq.Expressions.Expression, n); | |
for (var j = 0; j < i; j++) { | |
newNodes[j] = nodes.get_Item(j); | |
} | |
newNodes[i] = node; | |
} | |
} | |
if (newNodes == null) { | |
return nodes; | |
} | |
return new (System.Collections.Generic.List$1(System.Linq.Expressions.Expression).ctor$1)(newNodes); | |
}; | |
$p.VisitArguments = function ExpressionVisitor_VisitArguments(nodes) { | |
var newNodes = null; | |
for (var i = 0, n = nodes.System$Linq$Expressions$IArgumentProvider$get_Arguments().get_Count(); i < n; i++) { | |
var curNode = nodes.System$Linq$Expressions$IArgumentProvider$get_Arguments().get_Item(i); | |
var node = this.Visit$1(curNode); | |
if (newNodes != null) { | |
newNodes[i] = node; | |
} | |
else | |
if (!(node === curNode)) { | |
newNodes = $d.array(System.Linq.Expressions.Expression, n); | |
for (var j = 0; j < i; j++) { | |
newNodes[j] = nodes.System$Linq$Expressions$IArgumentProvider$get_Arguments().get_Item(j); | |
} | |
newNodes[i] = node; | |
} | |
} | |
return newNodes; | |
}; | |
$t.Visit = function ExpressionVisitor_Visit(T, nodes, elementVisitor) { | |
var newNodes = null; | |
for (var i = 0, n = nodes.get_Count(); i < n; i++) { | |
var node = elementVisitor(nodes.get_Item(i)); | |
if (newNodes != null) { | |
newNodes[i] = node; | |
} | |
else | |
if (!(node === nodes.get_Item(i))) { | |
newNodes = $d.array(T, n); | |
for (var j = 0; j < i; j++) { | |
newNodes[j] = nodes.get_Item(j); | |
} | |
newNodes[i] = node; | |
} | |
} | |
if (newNodes == null) { | |
return nodes; | |
} | |
return new (System.Collections.Generic.List$1(T).ctor$1)(newNodes); | |
}; | |
$p.VisitAndConvert$1 = function ExpressionVisitor_VisitAndConvert(T, node, callerName) { | |
if (node == null) { | |
return null; | |
} | |
node = $d.as(this.Visit$1(node), T); | |
if (node == null) { | |
throw new System.Exception.ctor$1("MustRewriteToSameNode"); | |
} | |
return node; | |
}; | |
$p.VisitAndConvert = function ExpressionVisitor_VisitAndConvert(T, nodes, callerName) { | |
var newNodes = null; | |
for (var i = 0, n = nodes.get_Count(); i < n; i++) { | |
var node = $d.as(this.Visit$1(nodes.get_Item(i)), T); | |
if (node == null) { | |
throw new System.Exception.ctor$1("MustRewriteToSameNode"); | |
} | |
if (newNodes != null) { | |
newNodes[i] = node; | |
} | |
else | |
if (!(node === nodes.get_Item(i))) { | |
newNodes = $d.array(T, n); | |
for (var j = 0; j < i; j++) { | |
newNodes[j] = nodes.get_Item(j); | |
} | |
newNodes[i] = node; | |
} | |
} | |
if (newNodes == null) { | |
return nodes; | |
} | |
return new (System.Collections.Generic.List$1(T).ctor$1)(newNodes); | |
}; | |
$p.VisitBinary = function ExpressionVisitor_VisitBinary(node) { | |
return $t.ValidateBinary(node, node.Update(this.Visit$1(node.get_Left()), this.VisitAndConvert$1(System.Linq.Expressions.LambdaExpression, | |
node.get_Conversion(), "VisitBinary"), this.Visit$1(node.get_Right()))); | |
}; | |
$p.VisitConditional = function ExpressionVisitor_VisitConditional(node) { | |
return node.Update(this.Visit$1(node.get_Test()), this.Visit$1(node.get_IfTrue()), this.Visit$1(node.get_IfFalse())); | |
}; | |
$p.VisitConstant = function ExpressionVisitor_VisitConstant(node) { | |
return node; | |
}; | |
$p.VisitDefault = function ExpressionVisitor_VisitDefault(node) { | |
return node; | |
}; | |
$p.VisitInvocation = function ExpressionVisitor_VisitInvocation(node) { | |
var e = this.Visit$1(node.get_Expression()); | |
var a = this.VisitArguments(node); | |
if (e == node.get_Expression() && a == null) { | |
return node; | |
} | |
return node.Rewrite(e, a); | |
}; | |
$p.VisitLambda = function ExpressionVisitor_VisitLambda(T, node) { | |
return node.Update(this.Visit$1(node.get_Body()), this.VisitAndConvert(System.Linq.Expressions.ParameterExpression, | |
node.get_Parameters(), "VisitLambda")); | |
}; | |
$p.VisitMember = function ExpressionVisitor_VisitMember(node) { | |
return node.Update(this.Visit$1(node.get_Expression())); | |
}; | |
$p.VisitIndex = function ExpressionVisitor_VisitIndex(node) { | |
var o = this.Visit$1(node.get_Object()); | |
var a = this.VisitArguments(node); | |
if (o == node.get_Object() && a == null) { | |
return node; | |
} | |
return node; | |
}; | |
$p.VisitMethodCall = function ExpressionVisitor_VisitMethodCall(node) { | |
var o = this.Visit$1(node.get_Object()); | |
var a = this.VisitArguments(node); | |
if (o == node.get_Object() && a == null) { | |
return node; | |
} | |
return node; | |
}; | |
$p.VisitNewArray = function ExpressionVisitor_VisitNewArray(node) { | |
return node.Update(this.Visit(node.get_Expressions())); | |
}; | |
$p.VisitNew = function ExpressionVisitor_VisitNew(node) { | |
return node.Update(this.Visit(node.get_Arguments())); | |
}; | |
$p.VisitParameter = function ExpressionVisitor_VisitParameter(node) { | |
return node; | |
}; | |
$p.VisitTypeBinary = function ExpressionVisitor_VisitTypeBinary(node) { | |
return node.Update(this.Visit$1(node.get_Expression())); | |
}; | |
$p.VisitUnary = function ExpressionVisitor_VisitUnary(node) { | |
return $t.ValidateUnary(node, node.Update(this.Visit$1(node.get_Operand()))); | |
}; | |
$p.VisitMemberInit = function ExpressionVisitor_VisitMemberInit(node) { | |
return node.Update(this.VisitAndConvert$1(System.Linq.Expressions.NewExpression, node.get_NewExpression(), | |
"VisitMemberInit"), $t.Visit(System.Linq.Expressions.MemberBinding, node.get_Bindings(), | |
$d.delegate(this.VisitMemberBinding, this))); | |
}; | |
$p.VisitListInit = function ExpressionVisitor_VisitListInit(node) { | |
return node.Update(this.VisitAndConvert$1(System.Linq.Expressions.NewExpression, node.get_NewExpression(), | |
"VisitListInit"), $t.Visit(System.Linq.Expressions.ElementInit, node.get_Initializers(), | |
$d.delegate(this.VisitElementInit, this))); | |
}; | |
$p.VisitElementInit = function ExpressionVisitor_VisitElementInit(node) { | |
return node.Update(this.Visit(node.get_Arguments())); | |
}; | |
$p.VisitMemberBinding = function ExpressionVisitor_VisitMemberBinding(node) { | |
switch (node.get_BindingType()) { | |
case 0: | |
return this.VisitMemberAssignment($d.cast(node, System.Linq.Expressions.MemberAssignment)); | |
case 1: | |
return this.VisitMemberMemberBinding($d.cast(node, System.Linq.Expressions.MemberMemberBinding)); | |
case 2: | |
return this.VisitMemberListBinding($d.cast(node, System.Linq.Expressions.MemberListBinding)); | |
default: | |
throw new System.Exception.ctor$1("UnhandledBindingType"); | |
} | |
}; | |
$p.VisitMemberAssignment = function ExpressionVisitor_VisitMemberAssignment(node) { | |
return node.Update(this.Visit$1(node.get_Expression())); | |
}; | |
$p.VisitMemberMemberBinding = function ExpressionVisitor_VisitMemberMemberBinding(node) { | |
return node.Update($t.Visit(System.Linq.Expressions.MemberBinding, node.get_Bindings(), $d.delegate(this.VisitMemberBinding, | |
this))); | |
}; | |
$p.VisitMemberListBinding = function ExpressionVisitor_VisitMemberListBinding(node) { | |
return node.Update($t.Visit(System.Linq.Expressions.ElementInit, node.get_Initializers(), $d.delegate(this.VisitElementInit, | |
this))); | |
}; | |
$t.ValidateUnary = function ExpressionVisitor_ValidateUnary(before, after) { | |
if (before != after && before.get_Method() == null) { | |
if (after.get_Method() != null) { | |
throw new System.Exception.ctor$1("MustRewriteWithoutMethod"); | |
} | |
if (before.get_Operand() != null && after.get_Operand() != null) { | |
$t.ValidateChildType(before.get_Operand().get_Type(), after.get_Operand().get_Type(), | |
"VisitUnary"); | |
} | |
} | |
return after; | |
}; | |
$t.ValidateBinary = function ExpressionVisitor_ValidateBinary(before, after) { | |
if (before != after && before.get_Method() == null) { | |
if (after.get_Method() != null) { | |
throw new System.Exception.ctor$1("MustRewriteWithoutMethod"); | |
} | |
$t.ValidateChildType(before.get_Left().get_Type(), after.get_Left().get_Type(), "VisitBinary"); | |
$t.ValidateChildType(before.get_Right().get_Type(), after.get_Right().get_Type(), "VisitBinary"); | |
} | |
return after; | |
}; | |
$t.ValidateChildType = function ExpressionVisitor_ValidateChildType(before, after, methodName) { | |
if (before.get_IsValueType()) { | |
if (before == after) { | |
return; | |
} | |
} | |
else | |
if (!after.get_IsValueType()) { | |
return; | |
} | |
throw new System.Exception.ctor$1("MustRewriteChildToSameType"); | |
}; | |
}); | |
DuoCode.Runtime.Evaluator = $d.declare("DuoCode.Runtime.Evaluator", System.Linq.Expressions.ExpressionVisitor, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, null, [["AddArgument", p.AddArgument, 6], ["Evaluate", p.Evaluate, 6], ["VisitConstant", p.VisitConstant, 5], ["VisitBinary", p.VisitBinary, 5], ["VisitConditional", p.VisitConditional, 5], ["VisitMember", p.VisitMember, 5], ["VisitMethodCall", p.VisitMethodCall, 5], ["VisitNew", p.VisitNew, 5], ["VisitMemberInit", p.VisitMemberInit, 5], ["VisitListInit", p.VisitListInit, 5], ["VisitUnary", p.VisitUnary, 5], ["VisitInvocation", p.VisitInvocation, 5], ["VisitTypeBinary", p.VisitTypeBinary, 5], ["VisitNewArray", p.VisitNewArray, 5], ["VisitParameter", p.VisitParameter, 5], ["VisitLambda", p.VisitLambda, 5]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this.expression = null; | |
this.stack = new (System.Collections.Generic.Stack$1(System.Object).ctor)(); | |
this.arguments = new (System.Collections.Generic.Dictionary$2(System.Linq.Expressions.ParameterExpression, | |
System.Object).ctor)(); | |
}; | |
$t.ctor = function Evaluator(expression) { | |
$t.$baseType.ctor.call(this); | |
this.expression = expression; | |
}; | |
$t.ctor.prototype = $p; | |
$p.AddArgument = function Evaluator_AddArgument(parameter, value) { | |
this.arguments.set_Item(parameter, value); | |
}; | |
$p.Evaluate = function Evaluator_Evaluate() { | |
this.Visit$1(this.expression); | |
return this.stack.Peek(); | |
}; | |
$p.VisitConstant = function Evaluator_VisitConstant(node) { | |
$t.$baseType.prototype.VisitConstant.call(this, node); | |
this.stack.Push(node.get_Value()); | |
return node; | |
}; | |
$p.VisitBinary = function Evaluator_VisitBinary(node) { | |
$t.$baseType.prototype.VisitBinary.call(this, node); | |
var right = this.stack.Pop(); | |
var left = this.stack.Pop(); | |
switch (node.get_NodeType()) { | |
case 0: | |
this.stack.Push(DuoCode.Runtime.GenericMath.Add(left, right)); | |
break; | |
case 42: | |
this.stack.Push(DuoCode.Runtime.GenericMath.Subtract(left, right)); | |
break; | |
case 26: | |
this.stack.Push(DuoCode.Runtime.GenericMath.Multiply(left, right)); | |
break; | |
case 12: | |
this.stack.Push(DuoCode.Runtime.GenericMath.Divide(left, right)); | |
break; | |
case 25: | |
this.stack.Push(DuoCode.Runtime.GenericMath.Modulus(left, right)); | |
break; | |
case 5: | |
var array = $d.cast(left, Array); | |
var index = $d.cast(System.Convert.ChangeType(right, $d.typeOf(System.Int64)), System.Int64); | |
var value = array.GetValue$1(index); | |
this.stack.Push(value); | |
break; | |
} | |
return node; | |
}; | |
$p.VisitConditional = function Evaluator_VisitConditional(node) { | |
$t.$baseType.prototype.VisitConditional.call(this, node); | |
var ifFalse = this.stack.Pop(); | |
var ifTrue = this.stack.Pop(); | |
var test = $d.cast(this.stack.Pop(), Boolean); | |
this.stack.Push(test ? ifTrue : ifFalse); | |
return node; | |
}; | |
$p.VisitMember = function Evaluator_VisitMember(node) { | |
$t.$baseType.prototype.VisitMember.call(this, node); | |
var obj = this.stack.Pop(); | |
var fieldInfo = $d.as(node.get_Member(), System.Reflection.FieldInfo); | |
if (fieldInfo != null) { | |
var field = fieldInfo; | |
var value = field.GetValue(obj); | |
this.stack.Push(value); | |
} | |
else { | |
var property = $d.cast(node.get_Member(), System.Reflection.PropertyInfo); | |
var value = property.GetValue$1(obj, null); | |
this.stack.Push(value); | |
} | |
return node; | |
}; | |
$p.VisitMethodCall = function Evaluator_VisitMethodCall(node) { | |
$t.$baseType.prototype.VisitMethodCall.call(this, node); | |
var args = System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, System.Object, node.get_Arguments(), | |
$d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
var obj = this.stack.Pop(); | |
var value = node.get_Method().Invoke(obj, args); | |
this.stack.Push(value); | |
return node; | |
}; | |
$p.VisitNew = function Evaluator_VisitNew(node) { | |
$t.$baseType.prototype.VisitNew.call(this, node); | |
var args = System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, System.Object, node.get_Arguments(), | |
$d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
var obj = node.get_Constructor().Invoke$2(args); | |
this.stack.Push(obj); | |
return node; | |
}; | |
$p.VisitMemberInit = function Evaluator_VisitMemberInit(node) { | |
$t.$baseType.prototype.VisitMemberInit.call(this, node); | |
var bindings = System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.MemberBinding, System.Object, node.get_Bindings(), | |
$d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
var obj = this.stack.Pop(); | |
for (var i = 0; i < node.get_Bindings().get_Count(); i++) { | |
var binding = node.get_Bindings().get_Item(i); | |
var fieldInfo = $d.as(binding.get_Member(), System.Reflection.FieldInfo); | |
if (fieldInfo != null) { | |
fieldInfo.SetValue(obj, bindings[i]); | |
} | |
else { | |
var propertyInfo = $d.as(binding.get_Member(), System.Reflection.PropertyInfo); | |
if (propertyInfo != null) { | |
propertyInfo.SetValue$1(obj, bindings[i], null); | |
} | |
} | |
} | |
this.stack.Push(obj); | |
return node; | |
}; | |
$p.VisitListInit = function Evaluator_VisitListInit(node) { | |
$t.$baseType.prototype.VisitListInit.call(this, node); | |
var args = System.Linq.Enumerable.ToArray($d.arrayType(System.Object), System.Linq.Enumerable.Reverse($d.arrayType(System.Object), | |
System.Linq.Enumerable.Select(System.Linq.Expressions.ElementInit, $d.arrayType(System.Object), | |
node.get_Initializers(), $d.delegate(function(init) { | |
return System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, System.Object, | |
init.get_Arguments(), $d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
}, this)))); | |
var list = this.stack.Pop(); | |
for (var i = 0; i < node.get_Initializers().get_Count(); i++) { | |
var binding = node.get_Initializers().get_Item(i); | |
var argument = args[i]; | |
binding.get_AddMethod().Invoke(list, argument); | |
} | |
this.stack.Push(list); | |
return node; | |
}; | |
$p.VisitUnary = function Evaluator_VisitUnary(node) { | |
$t.$baseType.prototype.VisitUnary.call(this, node); | |
var value = this.stack.Pop(); | |
switch (node.get_NodeType()) { | |
case 34: | |
this.stack.Push(!$d.cast(value, Boolean)); | |
break; | |
case 10: | |
this.stack.Push(System.Convert.ChangeType(value, node.get_Type())); | |
break; | |
case 44: | |
this.stack.Push(node.get_Type().IsInstanceOfType(value) ? value : null); | |
break; | |
} | |
return node; | |
}; | |
$p.VisitInvocation = function Evaluator_VisitInvocation(node) { | |
$t.$baseType.prototype.VisitInvocation.call(this, node); | |
var args = System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, System.Object, node.get_Arguments(), | |
$d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
var lambda = $d.cast(this.stack.Pop(), System.Delegate); | |
var value = lambda.DynamicInvoke(args); | |
this.stack.Push(value); | |
return node; | |
}; | |
$p.VisitTypeBinary = function Evaluator_VisitTypeBinary(node) { | |
$t.$baseType.prototype.VisitTypeBinary.call(this, node); | |
var expression = this.stack.Pop(); | |
var value = node.get_TypeOperand().IsInstanceOfType(expression); | |
this.stack.Push(value); | |
return node; | |
}; | |
$p.VisitNewArray = function Evaluator_VisitNewArray(node) { | |
$t.$baseType.prototype.VisitNewArray.call(this, node); | |
var args = System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Reverse(System.Object, | |
System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, System.Object, node.get_Expressions(), | |
$d.delegate(function(_) { | |
return this.stack.Pop(); | |
}, this)))); | |
var array = Array.CreateInstance(node.get_Type().GetElementType(), node.get_Expressions().get_Count(), | |
false); | |
for (var i = 0; i < array.length; i++) { | |
array.SetValue(args[i], i); | |
} | |
this.stack.Push(array); | |
return node; | |
}; | |
$p.VisitParameter = function Evaluator_VisitParameter(node) { | |
var value = this.arguments.get_Item(node); | |
this.stack.Push(value); | |
return node; | |
}; | |
$p.VisitLambda = function Evaluator_VisitLambda(T, node) { | |
this.stack.Push(node.Compile$1()); | |
return node; | |
}; | |
}); | |
DuoCode.Runtime.EvaluatorExtensions = $d.declare("DuoCode.Runtime.EvaluatorExtensions", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [0, null, [["Evaluate", t.Evaluate, 22], ["ExtractArguments", t.ExtractArguments, 22], ["ExtractArguments", t.ExtractArguments$1, 22]]]; }; | |
$t.Evaluate = function EvaluatorExtensions_Evaluate(expression) { | |
return new DuoCode.Runtime.Evaluator.ctor(expression).Evaluate(); | |
}; | |
$t.ExtractArguments = function EvaluatorExtensions_ExtractArguments(expression) { | |
return System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, | |
System.Object, expression.get_Arguments(), $d.delegate(function(x) { | |
return DuoCode.Runtime.EvaluatorExtensions.Evaluate(x); | |
}, this))); | |
}; | |
$t.ExtractArguments$1 = function EvaluatorExtensions_ExtractArguments(expression) { | |
var parameters = expression.get_Method().parameters; | |
return System.Linq.Enumerable.ToDictionary$1($asm.anonymousTypes[0], String, System.Object, System.Linq.Enumerable.Select$1(System.Linq.Expressions.Expression, | |
$asm.anonymousTypes[0], expression.get_Arguments(), $d.delegate(function(x, i) { | |
return new $asm.anonymousTypes[0].ctor(parameters[i].get_Name(), DuoCode.Runtime.EvaluatorExtensions.Evaluate(x)); | |
}, this)), $d.delegate(function(x) { | |
return x.get_Name(); | |
}, this), $d.delegate(function(x) { | |
return x.get_Value(); | |
}, this)); | |
}; | |
}); | |
DuoCode.Runtime.GenericMath = $d.declare("DuoCode.Runtime.GenericMath", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, null, [["Add", t.Add, 22], ["Subtract", t.Subtract, 22], ["Multiply", t.Multiply, 22], ["Divide", t.Divide, 22], ["Modulus", t.Modulus, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function GenericMath() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.IsInteger = function GenericMath_IsInteger(type) { | |
return type == $d.typeOf(System.Byte) || type == $d.typeOf(System.Int16) || type == $d.typeOf(System.Int32) || type == $d.typeOf(System.Int64); | |
}; | |
$t.IsBinaryFloat = function GenericMath_IsBinaryFloat(type) { | |
return type == $d.typeOf(System.Single) || type == $d.typeOf(System.Double); | |
}; | |
$t.IsDecimal = function GenericMath_IsDecimal(type) { | |
return false; | |
}; | |
$t.GetWidestType = function GenericMath_GetWidestType(type1, type2) { | |
if (type1 == type2) | |
return type1; | |
if ($t.IsInteger(type1)) | |
return type2; | |
if ($t.IsBinaryFloat(type1)) { | |
if (!$t.IsDecimal(type2)) | |
return type1; | |
} | |
if ($t.IsDecimal(type1)) { | |
if (!$t.IsBinaryFloat(type2)) | |
return type1; | |
} | |
throw new System.InvalidOperationException.ctor$1("There is no implicit conversion between " + type1.get_FullName() + " and " + type2.get_FullName()); | |
}; | |
$t.Add = function GenericMath_Add(left, right) { | |
var widestType = $t.GetWidestType($d.getTypeFromInst(left), $d.getTypeFromInst(right)); | |
left = System.Convert.ChangeType(left, widestType); | |
right = System.Convert.ChangeType(right, widestType); | |
if ($d.is(left, System.Byte)) | |
return $d.cast(left, System.Byte) + $d.cast(right, System.Byte); | |
else | |
if ($d.is(left, System.Int16)) | |
return $d.cast(left, System.Int16) + $d.cast(right, System.Int16); | |
else | |
if ($d.is(left, System.Int32)) | |
return $d.cast(left, System.Int32) + $d.cast(right, System.Int32); | |
else | |
if ($d.is(left, System.Int64)) | |
return $d.cast(left, System.Int64) + $d.cast(right, System.Int64); | |
else | |
if ($d.is(left, System.Single)) | |
return $d.cast(left, System.Single) + $d.cast(right, System.Single); | |
else | |
if ($d.is(left, System.Decimal)) | |
return $d.cast(left, System.Decimal) + $d.cast(right, System.Decimal); | |
else | |
return $d.cast(left, System.Double) + $d.cast(right, System.Double); | |
}; | |
$t.Subtract = function GenericMath_Subtract(left, right) { | |
var widestType = $t.GetWidestType($d.getTypeFromInst(left), $d.getTypeFromInst(right)); | |
left = System.Convert.ChangeType(left, widestType); | |
right = System.Convert.ChangeType(right, widestType); | |
if ($d.is(left, System.Byte)) | |
return $d.cast(left, System.Byte) - $d.cast(right, System.Byte); | |
else | |
if ($d.is(left, System.Int16)) | |
return $d.cast(left, System.Int16) - $d.cast(right, System.Int16); | |
else | |
if ($d.is(left, System.Int32)) | |
return $d.cast(left, System.Int32) - $d.cast(right, System.Int32); | |
else | |
if ($d.is(left, System.Int64)) | |
return $d.cast(left, System.Int64) - $d.cast(right, System.Int64); | |
else | |
if ($d.is(left, System.Single)) | |
return $d.cast(left, System.Single) - $d.cast(right, System.Single); | |
else | |
if ($d.is(left, System.Decimal)) | |
return $d.cast(left, System.Decimal) - $d.cast(right, System.Decimal); | |
else | |
return $d.cast(left, System.Double) - $d.cast(right, System.Double); | |
}; | |
$t.Multiply = function GenericMath_Multiply(left, right) { | |
var widestType = $t.GetWidestType($d.getTypeFromInst(left), $d.getTypeFromInst(right)); | |
left = System.Convert.ChangeType(left, widestType); | |
right = System.Convert.ChangeType(right, widestType); | |
if ($d.is(left, System.Byte)) | |
return $d.cast(left, System.Byte) * $d.cast(right, System.Byte); | |
else | |
if ($d.is(left, System.Int16)) | |
return $d.cast(left, System.Int16) * $d.cast(right, System.Int16); | |
else | |
if ($d.is(left, System.Int32)) | |
return $d.cast(left, System.Int32) * $d.cast(right, System.Int32); | |
else | |
if ($d.is(left, System.Int64)) | |
return $d.cast(left, System.Int64) * $d.cast(right, System.Int64); | |
else | |
if ($d.is(left, System.Single)) | |
return $d.cast(left, System.Single) * $d.cast(right, System.Single); | |
else | |
if ($d.is(left, System.Decimal)) | |
return $d.cast(left, System.Decimal) * $d.cast(right, System.Decimal); | |
else | |
return $d.cast(left, System.Double) * $d.cast(right, System.Double); | |
}; | |
$t.Divide = function GenericMath_Divide(left, right) { | |
var widestType = $t.GetWidestType($d.getTypeFromInst(left), $d.getTypeFromInst(right)); | |
left = System.Convert.ChangeType(left, widestType); | |
right = System.Convert.ChangeType(right, widestType); | |
if ($d.is(left, System.Byte)) | |
return ($d.cast(left, System.Byte) / $d.cast(right, System.Byte) | 0); | |
else | |
if ($d.is(left, System.Int16)) | |
return ($d.cast(left, System.Int16) / $d.cast(right, System.Int16) | 0); | |
else | |
if ($d.is(left, System.Int32)) | |
return ($d.cast(left, System.Int32) / $d.cast(right, System.Int32) | 0); | |
else | |
if ($d.is(left, System.Int64)) | |
return ($d.cast(left, System.Int64) / $d.cast(right, System.Int64) | 0); | |
else | |
if ($d.is(left, System.Single)) | |
return $d.cast(left, System.Single) / $d.cast(right, System.Single); | |
else | |
if ($d.is(left, System.Decimal)) | |
return $d.cast(left, System.Decimal) / $d.cast(right, System.Decimal); | |
else | |
return $d.cast(left, System.Double) / $d.cast(right, System.Double); | |
}; | |
$t.Modulus = function GenericMath_Modulus(left, right) { | |
var widestType = $t.GetWidestType($d.getTypeFromInst(left), $d.getTypeFromInst(right)); | |
left = System.Convert.ChangeType(left, widestType); | |
right = System.Convert.ChangeType(right, widestType); | |
if ($d.is(left, System.Byte)) | |
return $d.cast(left, System.Byte) % $d.cast(right, System.Byte); | |
else | |
if ($d.is(left, System.Int16)) | |
return $d.cast(left, System.Int16) % $d.cast(right, System.Int16); | |
else | |
if ($d.is(left, System.Int32)) | |
return $d.cast(left, System.Int32) % $d.cast(right, System.Int32); | |
else | |
if ($d.is(left, System.Int64)) | |
return $d.cast(left, System.Int64) % $d.cast(right, System.Int64); | |
else | |
if ($d.is(left, System.Single)) | |
return $d.cast(left, System.Single) % $d.cast(right, System.Single); | |
else | |
if ($d.is(left, System.Decimal)) | |
return $d.cast(left, System.Decimal) % $d.cast(right, System.Decimal); | |
else | |
return $d.cast(left, System.Double) % $d.cast(right, System.Double); | |
}; | |
}); | |
System.Environment = $d.declare("System.Environment", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["NewLine", 20, 54]], [["GetResourceString", t.GetResourceString, 19], ["GetResourceString", t.GetResourceString$1, 19], ["get_CurrentManagedThreadId", t.get_CurrentManagedThreadId, 22], ["get_TickCount", t.get_TickCount, 22]], null, [["CurrentManagedThreadId", 45, 2], ["TickCount", 45, 3]]]; }; | |
$t.cctor = function() { | |
$t.NewLine = "\n"; | |
}; | |
$t.GetResourceString = function Environment_GetResourceString(key) { | |
return key; | |
}; | |
$t.GetResourceString$1 = function Environment_GetResourceString(key, values) { | |
var result = $t.GetResourceString(key); | |
if (values != null && values.length > 0) { | |
result += ": " + values.map(function(v) { | |
return v.toString(); | |
}).join(","); | |
} | |
return result; | |
}; | |
$t.get_CurrentManagedThreadId = function Environment_get_CurrentManagedThreadId() { | |
return 1; | |
}; | |
$t.get_TickCount = function Environment_get_TickCount() { | |
return ((System.Stopwatch.GetTimestamp() / 10000 | 0) | 0); | |
}; | |
}); | |
System.EventArgs = $d.declare("System.EventArgs", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["Empty", System.EventArgs, 54]], null, [["ctor", t.ctor, 6]]]; }; | |
$t.cctor = function() { | |
$t.Empty = new System.EventArgs.ctor(); | |
}; | |
$t.ctor = function EventArgs() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.EventHandler = $d.declare("System.EventHandler", null, 65, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}); | |
System.EventHandler$1 = $d.declare("System.EventHandler`1", null, 321, $asm, function($t, $p, TEventArgs) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 6]]]; }; | |
}, ["TEventArgs"]); | |
System.FlagsAttribute = $d.declare("System.FlagsAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]], null, null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(16);$obj.set_Inherited(false);$obj.set_AllowMultiple(false);return $obj; }).call(this)]]; }; | |
$t.ctor = function FlagsAttribute() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.FormatException = $d.declare("System.FormatException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function FormatException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function FormatException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function FormatException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.GC = $d.declare("System.GC", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["KeepAlive", t.KeepAlive, 22], ["SuppressFinalize", t.SuppressFinalize, 22]]]; }; | |
$t.KeepAlive = function GC_KeepAlive(obj) {}; | |
$t.SuppressFinalize = function GC_SuppressFinalize(obj) { | |
if (obj == null) { | |
throw new System.ArgumentNullException.ctor$1("obj"); | |
} | |
}; | |
}); | |
System.Globalization.CompareInfo = $d.declare("System.Globalization.CompareInfo", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Compare", p.Compare, 6], ["Compare", p.Compare$1, 6], ["Compare", p.Compare$4, 6], ["Compare", p.Compare$3, 6], ["Compare", p.Compare$2, 6], ["Compare", p.Compare$5, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function CompareInfo() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function CompareInfo_Compare(string1, string2) { | |
return this.Compare$1(string1, string2, 0); | |
}; | |
$p.Compare$1 = function CompareInfo_Compare(string1, string2, options) { | |
return String.Compare(string1, string2); | |
}; | |
$p.Compare$4 = function CompareInfo_Compare(string1, offset1, length1, string2, offset2, length2) { | |
return this.Compare$5(string1, offset1, length1, string2, offset2, length2, 0); | |
}; | |
$p.Compare$3 = function CompareInfo_Compare(string1, offset1, string2, offset2, options) { | |
return this.Compare$5(string1, offset1, string1 == null ? 0 : string1.length - offset1, string2, | |
offset2, string2 == null ? 0 : string2.length - offset2, options); | |
}; | |
$p.Compare$2 = function CompareInfo_Compare(string1, offset1, string2, offset2) { | |
return this.Compare$3(string1, offset1, string2, offset2, 0); | |
}; | |
$p.Compare$5 = function CompareInfo_Compare(string1, offset1, length1, string2, offset2, length2, options) { | |
return String.Compare$1(string1.Substring$1(offset1, length1), string2.Substring$1(offset2, length2), | |
5); | |
}; | |
}); | |
System.Globalization.CompareOptions = $d.declareEnum("System.Globalization.CompareOptions", 45, $asm, 289, ["None", "IgnoreCase", "IgnoreNonSpace", "IgnoreSymbols", "IgnoreKanaType", "IgnoreWidth", "OrdinalIgnoreCase", "StringSort", "Ordinal"], [0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x10000000, 0x20000000, 0x40000000]); | |
System.IFormatProvider = $d.declare("System.IFormatProvider", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetFormat", null, 6]]]; }; | |
}); | |
System.Globalization.CultureInfo = $d.declare("System.Globalization.CultureInfo", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.IFormatProvider]; | |
$t.$typeInfo = function(t, p) { return [1, [["CurrentCulture", System.Globalization.CultureInfo, 54], ["InvariantCulture", System.Globalization.CultureInfo, 54]], [["get_Name", p.get_Name, 6], ["get_CompareInfo", p.get_CompareInfo, 6], ["GetFormat", p.GetFormat, 6]], [["ctor", t.ctor, 6]], [["Name", 20, 0], ["CompareInfo", System.Globalization.CompareInfo, 1]]]; }; | |
$t.cctor = function() { | |
$t.CurrentCulture = new System.Globalization.CultureInfo.ctor(); | |
$t.InvariantCulture = new System.Globalization.CultureInfo.ctor(); | |
}; | |
$t.$ator = function() { | |
this.Name = null; | |
this.CompareInfo = null; | |
}; | |
$p.get_Name = function CultureInfo_get_Name() { return this.Name; }; | |
$p.set_Name = function CultureInfo_set_Name(value) { this.Name = value;return value; }; | |
$p.get_CompareInfo = function CultureInfo_get_CompareInfo() { return this.CompareInfo; }; | |
$p.set_CompareInfo = function CultureInfo_set_CompareInfo(value) { this.CompareInfo = value;return value; }; | |
$t.ctor = function CultureInfo() { | |
$t.$baseType.ctor.call(this); | |
this.set_CompareInfo(new System.Globalization.CompareInfo.ctor()); | |
}; | |
$t.ctor.prototype = $p; | |
$p.GetFormat = function CultureInfo_GetFormat(formatType) { | |
return null; | |
}; | |
$p.System$IFormatProvider$GetFormat = $p.GetFormat; | |
}); | |
System.Guid = $d.declare("System.Guid", null, 62, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IFormattable, System.IComparable, System.IComparable$1(System.Guid), System.IEquatable$1(System.Guid)]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["Empty", System.Guid, 54]], [["NewGuid", t.NewGuid, 22], ["CompareTo", p.CompareTo$1, 6], ["CompareTo", p.CompareTo, 6], ["Equals", p.Equals, 6], ["Equals", p.Equals$1, 6], ["GetHashCode", p.GetHashCode, 6], ["ToByteArray", p.ToByteArray, 6], ["ToString", p.ToString, 6], ["ToString", p.ToString$1, 6], ["ToString", p.ToString$2, 6], ["Parse", t.Parse, 22], ["ParseExact", t.ParseExact, 22], ["TryParse", t.TryParse, 22], ["TryParseExact", t.TryParseExact, 22]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6]]]; }; | |
$t.cctor = function() { | |
$t.Empty = new System.Guid.ctor(); | |
$t.zeros = $d.array(System.Byte, 16); | |
$t.random = new System.Random.ctor(); | |
}; | |
$t.ctor = function Guid() { | |
this.a = null; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function Guid(b) { | |
if (b == null || b.length != 16) | |
throw new System.ArgumentException.ctor$1("b"); | |
this.a = $d.array(System.Byte, 16); | |
b.CopyTo(this.a, 0); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.NewGuid = function Guid_NewGuid() { | |
var a = $d.array(System.Byte, 16); | |
$t().random.NextBytes(a); | |
a[6] = ((a[6] & 15 | 64) & 0xFF); | |
a[8] = ((a[8] & 191 | 128) & 0xFF); | |
return new System.Guid.ctor$1(a); | |
}; | |
$p.CompareTo$1 = function Guid_CompareTo(obj) { return this.CompareTo($d.cast(obj, System.Guid)); }; | |
$p.CompareTo = function Guid_CompareTo(other) { | |
if (this === other) | |
return 0; | |
var a = this.a || $t().zeros; | |
var b = other.a || $t().zeros; | |
for (var i = 0; i < 16; i++) { | |
if (a[i] < b[i]) | |
return -1; | |
if (a[i] > b[i]) | |
return 1; | |
} | |
return 0; | |
}; | |
$p.Equals = function Guid_Equals(o) { | |
if (o == null || !($d.is(o, System.Guid))) | |
return false; | |
return this.CompareTo($d.cast(o, System.Guid)) == 0; | |
}; | |
$p.Equals$1 = function Guid_Equals(other) { | |
return this.CompareTo(other) == 0; | |
}; | |
$p.GetHashCode = function Guid_GetHashCode() { | |
var hash = 0; | |
if (this.a != null) | |
for (var k = 0; k < 16; k += 4) { | |
hash ^= (this.a[k] | (this.a[k + 1] << 8) | (this.a[k + 2] << 16) | (this.a[k + 3] << 24)); | |
} | |
return hash; | |
}; | |
$p.ToByteArray = function Guid_ToByteArray() { | |
var a = this.a || $t().zeros; | |
return a.Clone(); | |
}; | |
$p.ToString = function Guid_ToString() { return this.ToString$2("D", null); }; | |
$p.ToString$1 = function Guid_ToString(format) { return this.ToString$2(format, null); }; | |
$t.HexToChar = function Guid_HexToChar(a) { | |
a = a & 15; | |
return (((a > 9) ? a - 10 + 97 : a + 48) & 0xFFFF); | |
}; | |
$t.HexsToChars = function Guid_HexsToChars(guidChars, offset, a, b) { | |
guidChars[offset++] = $t.HexToChar(a >> 4); | |
guidChars[offset++] = $t.HexToChar(a); | |
guidChars[offset++] = $t.HexToChar(b >> 4); | |
guidChars[offset++] = $t.HexToChar(b); | |
return offset; | |
}; | |
$p.ToString$2 = function Guid_ToString(format, provider) { | |
if (format == null || format.length == 0) | |
format = "D"; | |
var guidChars; | |
var offset = 0; | |
var strLength = 38; | |
var dash = true; | |
if (format.length != 1) { | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_InvalidGuidFormatSpecification")); | |
} | |
var formatCh = format.get_Chars(0); | |
if (formatCh == 68 /*'D'*/ || formatCh == 100 /*'d'*/) { | |
guidChars = $d.array(System.Char, 36); | |
strLength = 36; | |
} | |
else | |
if (formatCh == 78 /*'N'*/ || formatCh == 110 /*'n'*/) { | |
guidChars = $d.array(System.Char, 32); | |
strLength = 32; | |
dash = false; | |
} | |
else | |
if (formatCh == 66 /*'B'*/ || formatCh == 98 /*'b'*/) { | |
guidChars = $d.array(System.Char, 38); | |
guidChars[offset++] = 123 /*'{'*/; | |
guidChars[37] = 125 /*'}'*/; | |
} | |
else | |
if (formatCh == 80 /*'P'*/ || formatCh == 112 /*'p'*/) { | |
guidChars = $d.array(System.Char, 38); | |
guidChars[offset++] = 40 /*'('*/; | |
guidChars[37] = 41 /*')'*/; | |
} | |
else | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_InvalidGuidFormatSpecification")); | |
var a = this.a || $t().zeros; | |
offset = $t.HexsToChars(guidChars, offset, a[0], a[1]); | |
offset = $t.HexsToChars(guidChars, offset, a[2], a[3]); | |
if (dash) | |
guidChars[offset++] = 45 /*'-'*/; | |
offset = $t.HexsToChars(guidChars, offset, a[4], a[5]); | |
if (dash) | |
guidChars[offset++] = 45 /*'-'*/; | |
offset = $t.HexsToChars(guidChars, offset, a[6], a[7]); | |
if (dash) | |
guidChars[offset++] = 45 /*'-'*/; | |
offset = $t.HexsToChars(guidChars, offset, a[8], a[9]); | |
if (dash) | |
guidChars[offset++] = 45 /*'-'*/; | |
offset = $t.HexsToChars(guidChars, offset, a[10], a[11]); | |
offset = $t.HexsToChars(guidChars, offset, a[12], a[13]); | |
offset = $t.HexsToChars(guidChars, offset, a[14], a[15]); | |
return String.ctor$3(guidChars, 0, strLength); | |
}; | |
$t.Parse = function Guid_Parse(input) { | |
return $t.ParseExact(input, null); | |
}; | |
$t.ParseExact = function Guid_ParseExact(input, format) { | |
if (input == null) | |
throw new System.ArgumentNullException.ctor$1("input"); | |
var result = { value: new System.Guid.ctor() }; | |
if (!$t.TryParseExact(input, format, result)) | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_GuidUnrecognized")); | |
return result.value; | |
}; | |
$t.TryParse = function Guid_TryParse(input, result) { | |
return $t.TryParseExact(input, null, result); | |
}; | |
$t.TryParseExact = function Guid_TryParseExact(input, format, result) { | |
result.value = System.Guid().Empty; | |
if (input == null || (format != null && format.length != 1)) | |
return false; | |
var r = null; | |
var parts; | |
if (format == null || format == "b" || format == "p" || format == "d") { | |
var p = input.get_Chars(0); | |
var s = input.get_Chars(input.length - 1); | |
if ((format == "b" && (p != 123 /*'{'*/ || s != 125 /*'}'*/)) || (format == "p" && (p != 40 /*'('*/ || s != 41 /*')'*/)) || (format == "d" && input.length != 36)) | |
return false; | |
parts = /^[{(]?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})[)}]?$/ig.exec(input); | |
if (parts == null) | |
return false; | |
r = parts.slice(1).join(""); | |
} | |
else | |
if (format == "n") { | |
if (!/^([0-9a-f]{16})$/ig.test(input)) | |
return false; | |
r = input; | |
} | |
var a = $d.array(System.Byte, 16); | |
for (var i = 0; i < 16; i++) { | |
a[i] = parseInt(r.substring(i * 2, i * 2 + 2), 16); | |
} | |
result.value = new System.Guid.ctor$1(a); | |
return true; | |
}; | |
$p.System$IFormattable$ToString = $p.ToString$2; | |
$p.System$IComparable$CompareTo = $p.CompareTo$1; | |
$p.System$IComparable$1$CompareTo = $p.CompareTo; | |
$p.System$IEquatable$1$Equals = $p.Equals$1; | |
}); | |
System.ICustomFormatter = $d.declare("System.ICustomFormatter", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Format", null, 6]]]; }; | |
}); | |
System.IdentityFunction$1 = $d.declare("System.IdentityFunction`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [0, [["Default", System.Func$2(T, T), 54]], null, [["ctor", t.ctor, 6]]]; }; | |
$t.cctor = function() { | |
$t.Default = $d.delegate(function(x) { | |
return x; | |
}, this); | |
}; | |
$t.ctor = function IdentityFunction$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
}, ["T"]); | |
System.IndexOutOfRangeException = $d.declare("System.IndexOutOfRangeException", System.SystemException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function IndexOutOfRangeException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_IndexOutOfRangeException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function IndexOutOfRangeException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function IndexOutOfRangeException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.Int16 = $d.declare("System.Int16", Number, 43, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Int16), System.IEquatable$1(System.Int16), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MaxValue", 43, 86, 32767], ["MinValue", 43, 86, -32768]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MaxValue = 32767; | |
$t.MinValue = -32768; | |
$t.Parse = function Int16_Parse(s) { return Number.Parse(System.Int16, s); }; | |
$t.TryParse = function Int16_TryParse(s, result) { return Number.TryParse(System.Int16, s, result); }; | |
}); | |
System.Int32 = $d.declare("System.Int32", Number, 45, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Int32), System.IEquatable$1(System.Int32), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MaxValue", 45, 86, 2147483647], ["MinValue", 45, 86, -2147483648]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MaxValue = 2147483647; | |
$t.MinValue = -2147483648; | |
$t.Parse = function Int32_Parse(s) { return Number.Parse(System.Int32, s); }; | |
$t.TryParse = function Int32_TryParse(s, result) { return Number.TryParse(System.Int32, s, result); }; | |
}); | |
System.Int64 = $d.declare("System.Int64", Number, 47, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Int64), System.IEquatable$1(System.Int64), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 47, 86, -9007199254740991], ["MaxValue", 47, 86, 9007199254740991]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = -9007199254740991; | |
$t.MaxValue = 9007199254740991; | |
$t.Parse = function Int64_Parse(s) { return Number.Parse(System.Int64, s); }; | |
$t.TryParse = function Int64_TryParse(s, result) { return Number.TryParse(System.Int64, s, result); }; | |
}); | |
System.InvalidCastException = $d.declare("System.InvalidCastException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function InvalidCastException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.InvalidOperationException = $d.declare("System.InvalidOperationException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function InvalidOperationException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function InvalidOperationException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function InvalidOperationException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.IObservable$1 = $d.declare("System.IObservable`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["Subscribe", null, 6]]]; }; | |
}, ["T"]); | |
System.IObserver$1 = $d.declare("System.IObserver`1", null, 322, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["OnNext", null, 6], ["OnError", null, 6], ["OnCompleted", null, 6]]]; }; | |
}, ["T"]); | |
System.IO.Base64Decoder = $d.declare("System.IO.Base64Decoder", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [0, null, [["Decode", t.Decode, 22]]]; }; | |
$t.DecodeChar = function Base64Decoder_DecodeChar(c) { | |
return c > 64 && c < 91 ? c - 65 : c > 96 && c < 123 ? c - 71 : c > 47 && c < 58 ? c + 4 : c == 43 ? 62 : c == 47 ? 63 : 0; | |
}; | |
$t.Decode = function Base64Decoder_Decode(s) { | |
var sl = s.length; | |
var length = (sl * 3 + 1) >> 2; | |
if (s.charCodeAt(sl - 1) == 61 /*'='*/) | |
length -= 1; | |
if (s.charCodeAt(sl - 2) == 61 /*'='*/) | |
length -= 1; | |
var result = $d.array(System.Byte, length); | |
var dstIndex = 0, mod3 = 0, mod4 = 0, int24 = 0; | |
for (var srcIndex = 0; srcIndex < sl; srcIndex++) { | |
mod4 = srcIndex & 3; | |
int24 |= $t.DecodeChar(s.charCodeAt(srcIndex)) << 18 - 6 * mod4; | |
if (mod4 == 3 || sl - srcIndex == 1) { | |
for (mod3 = 0; mod3 < 3 && dstIndex < length; mod3++, dstIndex++) { | |
result[dstIndex] = ((int24 >> (16 >> mod3 & 24) & 255) & 0xFF); | |
} | |
int24 = 0; | |
} | |
} | |
return result; | |
}; | |
}); | |
System.IO.IOException = $d.declare("System.IO.IOException", System.SystemException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$3", t.ctor$3, 6], ["ctor$4", t.ctor$4, 3], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.$ator = function() { | |
this._maybeFullPath = null; | |
}; | |
$t.ctor = function IOException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_IOException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function IOException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$3 = function IOException(message, hresult) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$4 = function IOException(message, hresult, maybeFullPath) { | |
$t.$baseType.ctor$1.call(this, message); | |
this._maybeFullPath = maybeFullPath; | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.ctor$2 = function IOException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.IO.Stream = $d.declare("System.IO.Stream", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.IDisposable]; | |
$t.$typeInfo = function(t, p) { return [129, [["Null", System.IO.Stream, 54]], [["get_CanTimeout", p.get_CanTimeout, 6], ["get_ReadTimeout", p.get_ReadTimeout, 6], ["set_ReadTimeout", p.set_ReadTimeout, 6], ["get_WriteTimeout", p.get_WriteTimeout, 6], ["set_WriteTimeout", p.set_WriteTimeout, 6], ["CopyTo", p.CopyTo, 6], ["CopyTo", p.CopyTo$1, 6], ["Close", p.Close, 6], ["Dispose", p.Dispose, 6], ["Dispose", p.Dispose$1, 4], ["Flush", null, 6], ["Seek", null, 6], ["SetLength", null, 6], ["Read", null, 6], ["ReadByte", p.ReadByte, 6], ["Write", null, 6], ["WriteByte", p.WriteByte, 6]], [["ctor", t.ctor, 4]], [["CanRead", 39], ["CanSeek", 39], ["CanTimeout", 39, 0], ["CanWrite", 39], ["Length", 47], ["Position", 47], ["ReadTimeout", 45, 1, 2], ["WriteTimeout", 45, 3, 4]]]; }; | |
$t.cctor = function() { | |
$t.Null = new System.IO.Stream.NullStream.ctor(); | |
$t._DefaultCopyBufferSize = 81920; | |
}; | |
$t.ctor = $t.$baseType.ctor; | |
$p.get_CanTimeout = function Stream_get_CanTimeout() { | |
return false; | |
}; | |
$p.get_ReadTimeout = function Stream_get_ReadTimeout() { | |
throw new System.InvalidOperationException.ctor$1(System.Environment.GetResourceString("InvalidOperation_TimeoutsNotSupported")); | |
}; | |
$p.set_ReadTimeout = function Stream_set_ReadTimeout(value) { | |
throw new System.InvalidOperationException.ctor$1(System.Environment.GetResourceString("InvalidOperation_TimeoutsNotSupported")); | |
return value; | |
}; | |
$p.get_WriteTimeout = function Stream_get_WriteTimeout() { | |
throw new System.InvalidOperationException.ctor$1(System.Environment.GetResourceString("InvalidOperation_TimeoutsNotSupported")); | |
}; | |
$p.set_WriteTimeout = function Stream_set_WriteTimeout(value) { | |
throw new System.InvalidOperationException.ctor$1(System.Environment.GetResourceString("InvalidOperation_TimeoutsNotSupported")); | |
return value; | |
}; | |
$p.CopyTo = function Stream_CopyTo(destination) { | |
if (destination == null) | |
throw new System.ArgumentNullException.ctor$1("destination"); | |
if (!this.get_CanRead() && !this.get_CanWrite()) | |
throw new System.ObjectDisposedException.ctor$3(null, System.Environment.GetResourceString("ObjectDisposed_StreamClosed")); | |
if (!destination.get_CanRead() && !destination.get_CanWrite()) | |
throw new System.ObjectDisposedException.ctor$3("destination", System.Environment.GetResourceString("ObjectDisposed_StreamClosed")); | |
if (!this.get_CanRead()) | |
throw new System.NotSupportedException.ctor$1(System.Environment.GetResourceString("NotSupported_UnreadableStream")); | |
if (!destination.get_CanWrite()) | |
throw new System.NotSupportedException.ctor$1(System.Environment.GetResourceString("NotSupported_UnwritableStream")); | |
this.InternalCopyTo(destination, 81920); | |
}; | |
$p.CopyTo$1 = function Stream_CopyTo(destination, bufferSize) { | |
if (destination == null) | |
throw new System.ArgumentNullException.ctor$1("destination"); | |
if (bufferSize <= 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("bufferSize", System.Environment.GetResourceString("ArgumentOutOfRange_NeedPosNum")); | |
if (!this.get_CanRead() && !this.get_CanWrite()) | |
throw new System.ObjectDisposedException.ctor$3(null, System.Environment.GetResourceString("ObjectDisposed_StreamClosed")); | |
if (!destination.get_CanRead() && !destination.get_CanWrite()) | |
throw new System.ObjectDisposedException.ctor$3("destination", System.Environment.GetResourceString("ObjectDisposed_StreamClosed")); | |
if (!this.get_CanRead()) | |
throw new System.NotSupportedException.ctor$1(System.Environment.GetResourceString("NotSupported_UnreadableStream")); | |
if (!destination.get_CanWrite()) | |
throw new System.NotSupportedException.ctor$1(System.Environment.GetResourceString("NotSupported_UnwritableStream")); | |
this.InternalCopyTo(destination, bufferSize); | |
}; | |
$p.InternalCopyTo = function Stream_InternalCopyTo(destination, bufferSize) { | |
var buffer = $d.array(System.Byte, bufferSize); | |
var read; | |
while ((read = this.Read(buffer, 0, buffer.length)) != 0) { | |
destination.Write(buffer, 0, read); | |
} | |
}; | |
$p.Close = function Stream_Close() { | |
this.Dispose$1(true); | |
System.GC.SuppressFinalize(this); | |
}; | |
$p.Dispose = function Stream_Dispose() { | |
this.Close(); | |
}; | |
$p.Dispose$1 = function Stream_Dispose(disposing) {}; | |
$p.ReadByte = function Stream_ReadByte() { | |
var oneByteArray = $d.array(System.Byte, 1); | |
var r = this.Read(oneByteArray, 0, 1); | |
if (r == 0) | |
return -1; | |
return oneByteArray[0]; | |
}; | |
$p.WriteByte = function Stream_WriteByte(value) { | |
var oneByteArray = $d.array(System.Byte, 1); | |
oneByteArray[0] = value; | |
this.Write(oneByteArray, 0, 1); | |
}; | |
$p.System$IDisposable$Dispose = $p.Dispose; | |
}); | |
System.IO.MemoryStream = $d.declare("System.IO.MemoryStream", System.IO.Stream, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.IDisposable]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_CanRead", p.get_CanRead, 6], ["get_CanSeek", p.get_CanSeek, 6], ["get_CanWrite", p.get_CanWrite, 6], ["Dispose", p.Dispose$1, 4], ["Flush", p.Flush, 6], ["GetBuffer", p.GetBuffer, 6], ["InternalGetBuffer", p.InternalGetBuffer, 3], ["InternalGetOriginAndLength", p.InternalGetOriginAndLength, 3], ["InternalGetPosition", p.InternalGetPosition, 3], ["InternalReadInt32", p.InternalReadInt32, 3], ["InternalEmulateRead", p.InternalEmulateRead, 3], ["get_Capacity", p.get_Capacity, 6], ["set_Capacity", p.set_Capacity, 6], ["get_Length", p.get_Length, 6], ["get_Position", p.get_Position, 6], ["set_Position", p.set_Position, 6], ["Read", p.Read, 6], ["ReadByte", p.ReadByte, 6], ["Seek", p.Seek, 6], ["SetLength", p.SetLength, 6], ["ToArray", p.ToArray, 6], ["Write", p.Write, 6], ["WriteByte", p.WriteByte, 6], ["WriteTo", p.WriteTo, 6]], [["ctor", t.ctor, 6], ["ctor$2", t.ctor$2, 6], ["ctor$1", t.ctor$1, 6], ["ctor$3", t.ctor$3, 6], ["ctor$4", t.ctor$4, 6], ["ctor$5", t.ctor$5, 6], ["ctor$6", t.ctor$6, 6]], [["CanRead", 39, 0], ["CanSeek", 39, 1], ["CanWrite", 39, 2], ["Capacity", 45, 11, 12], ["Length", 47, 13], ["Position", 47, 14, 15]]]; }; | |
$t.cctor = function() { | |
$t.MemStreamMaxLength = 2147483647; | |
}; | |
$t.$ator = function() { | |
this._buffer = null; | |
this._origin = 0; | |
this._position = 0; | |
this._length = 0; | |
this._capacity = 0; | |
this._expandable = false; | |
this._writable = false; | |
this._exposable = false; | |
this._isOpen = false; | |
}; | |
$t.ctor = function MemoryStream() { | |
$t.ctor$2.call(this, 0); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$2 = function MemoryStream(capacity) { | |
$t.$baseType.ctor.call(this); | |
if (capacity < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("capacity", System.Environment.GetResourceString("ArgumentOutOfRange_NegativeCapacity")); | |
} | |
this._buffer = $d.array(System.Byte, capacity); | |
this._capacity = capacity; | |
this._expandable = true; | |
this._writable = true; | |
this._exposable = true; | |
this._origin = 0; | |
this._isOpen = true; | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$1 = function MemoryStream(buffer) { | |
$t.ctor$3.call(this, buffer, true); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$3 = function MemoryStream(buffer, writable) { | |
$t.$baseType.ctor.call(this); | |
if (buffer == null) | |
throw new System.ArgumentNullException.ctor$3("buffer", System.Environment.GetResourceString("ArgumentNull_Buffer")); | |
this._buffer = buffer; | |
this._length = this._capacity = buffer.length; | |
this._writable = writable; | |
this._exposable = false; | |
this._origin = 0; | |
this._isOpen = true; | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$4 = function MemoryStream(buffer, index, count) { | |
$t.ctor$6.call(this, buffer, index, count, true, false); | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.ctor$5 = function MemoryStream(buffer, index, count, writable) { | |
$t.ctor$6.call(this, buffer, index, count, writable, false); | |
}; | |
$t.ctor$5.prototype = $p; | |
$t.ctor$6 = function MemoryStream(buffer, index, count, writable, publiclyVisible) { | |
$t.$baseType.ctor.call(this); | |
if (buffer == null) | |
throw new System.ArgumentNullException.ctor$3("buffer", System.Environment.GetResourceString("ArgumentNull_Buffer")); | |
if (index < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("index", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (count < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (buffer.length - index < count) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_InvalidOffLen")); | |
this._buffer = buffer; | |
this._origin = this._position = index; | |
this._length = this._capacity = index + count; | |
this._writable = writable; | |
this._exposable = publiclyVisible; | |
this._expandable = false; | |
this._isOpen = true; | |
}; | |
$t.ctor$6.prototype = $p; | |
$p.get_CanRead = function MemoryStream_get_CanRead() { | |
return this._isOpen; | |
}; | |
$p.get_CanSeek = function MemoryStream_get_CanSeek() { | |
return this._isOpen; | |
}; | |
$p.get_CanWrite = function MemoryStream_get_CanWrite() { | |
return this._writable; | |
}; | |
$p.EnsureWriteable = function MemoryStream_EnsureWriteable() { | |
if (!this.get_CanWrite()) | |
System.IO.__Error.WriteNotSupported(); | |
}; | |
$p.Dispose$1 = function MemoryStream_Dispose(disposing) { | |
try { | |
if (disposing) { | |
this._isOpen = false; | |
this._writable = false; | |
this._expandable = false; | |
} | |
} | |
finally { | |
$t.$baseType.prototype.Dispose$1.call(this, disposing); | |
} | |
}; | |
$p.EnsureCapacity = function MemoryStream_EnsureCapacity(value) { | |
if (value < 0) | |
throw new System.IO.IOException.ctor$1(System.Environment.GetResourceString("IO.IO_StreamTooLong")); | |
if (value > this._capacity) { | |
var newCapacity = value; | |
if (newCapacity < 256) | |
newCapacity = 256; | |
if (newCapacity < this._capacity * 2) | |
newCapacity = this._capacity * 2; | |
this.set_Capacity(newCapacity); | |
return true; | |
} | |
return false; | |
}; | |
$p.Flush = function MemoryStream_Flush() {}; | |
$p.GetBuffer = function MemoryStream_GetBuffer() { | |
if (!this._exposable) | |
throw new System.Exception.ctor$1("UnauthorizedAccess_MemStreamBuffer"); | |
return this._buffer; | |
}; | |
$p.InternalGetBuffer = function MemoryStream_InternalGetBuffer() { | |
return this._buffer; | |
}; | |
$p.InternalGetOriginAndLength = function MemoryStream_InternalGetOriginAndLength(origin, length) { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
origin.value = this._origin; | |
length.value = this._length; | |
}; | |
$p.InternalGetPosition = function MemoryStream_InternalGetPosition() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
return this._position; | |
}; | |
$p.InternalReadInt32 = function MemoryStream_InternalReadInt32() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
var pos = (this._position += 4); | |
if (pos > this._length) { | |
this._position = this._length; | |
System.IO.__Error.EndOfFile(); | |
} | |
return (this._buffer[pos - 4] | this._buffer[pos - 3] << 8 | this._buffer[pos - 2] << 16 | this._buffer[pos - 1] << 24); | |
}; | |
$p.InternalEmulateRead = function MemoryStream_InternalEmulateRead(count) { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
var n = this._length - this._position; | |
if (n > count) | |
n = count; | |
if (n < 0) | |
n = 0; | |
this._position += n; | |
return n; | |
}; | |
$p.get_Capacity = function MemoryStream_get_Capacity() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
return this._capacity - this._origin; | |
}; | |
$p.set_Capacity = function MemoryStream_set_Capacity(value) { | |
if (value < this.get_Length()) | |
throw new System.ArgumentOutOfRangeException.ctor$3("value", System.Environment.GetResourceString("ArgumentOutOfRange_SmallCapacity")); | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
if (!this._expandable && (value != this.get_Capacity())) | |
System.IO.__Error.MemoryStreamNotExpandable(); | |
if (this._expandable && value != this._capacity) { | |
if (value > 0) { | |
var newBuffer = $d.array(System.Byte, value); | |
if (this._length > 0) | |
Array.Copy$2(this._buffer, 0, newBuffer, 0, this._length); | |
this._buffer = newBuffer; | |
} | |
else { | |
this._buffer = null; | |
} | |
this._capacity = value; | |
} | |
return value; | |
}; | |
$p.get_Length = function MemoryStream_get_Length() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
return this._length - this._origin; | |
}; | |
$p.get_Position = function MemoryStream_get_Position() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
return this._position - this._origin; | |
}; | |
$p.set_Position = function MemoryStream_set_Position(value) { | |
if (value < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("value", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
if (value > 2147483647) | |
throw new System.ArgumentOutOfRangeException.ctor$3("value", System.Environment.GetResourceString("ArgumentOutOfRange_StreamLength")); | |
this._position = this._origin + (value | 0); | |
return value; | |
}; | |
$p.Read = function MemoryStream_Read(buffer, offset, count) { | |
if (buffer == null) | |
throw new System.ArgumentNullException.ctor$3("buffer", System.Environment.GetResourceString("ArgumentNull_Buffer")); | |
if (offset < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("offset", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (count < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (buffer.length - offset < count) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_InvalidOffLen")); | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
var n = this._length - this._position; | |
if (n > count) | |
n = count; | |
if (n <= 0) | |
return 0; | |
if (n <= 8) { | |
var byteCount = n; | |
while (--byteCount >= 0) { | |
buffer[offset + byteCount] = this._buffer[this._position + byteCount]; | |
} | |
} | |
else | |
Array.Copy$2(this._buffer, this._position, buffer, offset, n); | |
this._position += n; | |
return n; | |
}; | |
$p.ReadByte = function MemoryStream_ReadByte() { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
if (this._position >= this._length) | |
return -1; | |
return this._buffer[this._position++]; | |
}; | |
$p.Seek = function MemoryStream_Seek(offset, loc) { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
if (offset > 2147483647) | |
throw new System.ArgumentOutOfRangeException.ctor$3("offset", System.Environment.GetResourceString("ArgumentOutOfRange_StreamLength")); | |
switch (loc) { | |
case 0: | |
{ | |
var tempPosition = this._origin + (offset | 0); | |
if (offset < 0 || tempPosition < this._origin) | |
throw new System.IO.IOException.ctor$1(System.Environment.GetResourceString("IO.IO_SeekBeforeBegin")); | |
this._position = tempPosition; | |
break; | |
} | |
case 1: | |
{ | |
var tempPosition = this._position + (offset | 0); | |
if (this._position + offset < this._origin || tempPosition < this._origin) | |
throw new System.IO.IOException.ctor$1(System.Environment.GetResourceString("IO.IO_SeekBeforeBegin")); | |
this._position = tempPosition; | |
break; | |
} | |
case 2: | |
{ | |
var tempPosition = this._length + (offset | 0); | |
if (this._length + offset < this._origin || tempPosition < this._origin) | |
throw new System.IO.IOException.ctor$1(System.Environment.GetResourceString("IO.IO_SeekBeforeBegin")); | |
this._position = tempPosition; | |
break; | |
} | |
default: | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_InvalidSeekOrigin")); | |
} | |
return this._position; | |
}; | |
$p.SetLength = function MemoryStream_SetLength(value) { | |
if (value < 0 || value > 2147483647) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("value", System.Environment.GetResourceString("ArgumentOutOfRange_StreamLength")); | |
} | |
this.EnsureWriteable(); | |
if (value > (2147483647 - this._origin)) { | |
throw new System.ArgumentOutOfRangeException.ctor$3("value", System.Environment.GetResourceString("ArgumentOutOfRange_StreamLength")); | |
} | |
var newLength = this._origin + (value | 0); | |
var allocatedNewArray = this.EnsureCapacity(newLength); | |
if (!allocatedNewArray && newLength > this._length) | |
Array.Clear(this._buffer, this._length, newLength - this._length); | |
this._length = newLength; | |
if (this._position > newLength) | |
this._position = newLength; | |
}; | |
$p.ToArray = function MemoryStream_ToArray() { | |
var copy = $d.array(System.Byte, this._length - this._origin); | |
Array.Copy$2(this._buffer, this._origin, copy, 0, this._length - this._origin); | |
return copy; | |
}; | |
$p.Write = function MemoryStream_Write(buffer, offset, count) { | |
if (buffer == null) | |
throw new System.ArgumentNullException.ctor$3("buffer", System.Environment.GetResourceString("ArgumentNull_Buffer")); | |
if (offset < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("offset", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (count < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$3("count", System.Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); | |
if (buffer.length - offset < count) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_InvalidOffLen")); | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
this.EnsureWriteable(); | |
var i = this._position + count; | |
if (i < 0) | |
throw new System.IO.IOException.ctor$1(System.Environment.GetResourceString("IO.IO_StreamTooLong")); | |
if (i > this._length) { | |
var mustZero = this._position > this._length; | |
if (i > this._capacity) { | |
var allocatedNewArray = this.EnsureCapacity(i); | |
if (allocatedNewArray) | |
mustZero = false; | |
} | |
if (mustZero) | |
Array.Clear(this._buffer, this._length, i - this._length); | |
this._length = i; | |
} | |
if ((count <= 8) && (buffer != this._buffer)) { | |
var byteCount = count; | |
while (--byteCount >= 0) { | |
this._buffer[this._position + byteCount] = buffer[offset + byteCount]; | |
} | |
} | |
else | |
Array.Copy$2(buffer, offset, this._buffer, this._position, count); | |
this._position = i; | |
}; | |
$p.WriteByte = function MemoryStream_WriteByte(value) { | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
this.EnsureWriteable(); | |
if (this._position >= this._length) { | |
var newLength = this._position + 1; | |
var mustZero = this._position > this._length; | |
if (newLength >= this._capacity) { | |
var allocatedNewArray = this.EnsureCapacity(newLength); | |
if (allocatedNewArray) | |
mustZero = false; | |
} | |
if (mustZero) | |
Array.Clear(this._buffer, this._length, this._position - this._length); | |
this._length = newLength; | |
} | |
this._buffer[this._position++] = value; | |
}; | |
$p.WriteTo = function MemoryStream_WriteTo(stream) { | |
if (stream == null) | |
throw new System.ArgumentNullException.ctor$3("stream", System.Environment.GetResourceString("ArgumentNull_Stream")); | |
if (!this._isOpen) | |
System.IO.__Error.StreamIsClosed(); | |
stream.Write(this._buffer, this._origin, this._length - this._origin); | |
}; | |
}); | |
System.IO.Path = $d.declare("System.IO.Path", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["DirectorySeparatorChar", 40, 86, 92 /*'\\'*/], ["AltDirectorySeparatorChar", 40, 86, 47 /*'/'*/], ["VolumeSeparatorChar", 40, 86, 58 /*':'*/], ["PathSeparator", 40, 86, 59 /*';'*/], ["InvalidPathChars", 168, 54], ["TrimEndChars", 168, 51], ["MaxPath", 45, 51]], [["ChangeExtension", t.ChangeExtension, 22], ["GetDirectoryName", t.GetDirectoryName, 22], ["GetRootLength", t.GetRootLength, 19], ["IsDirectorySeparator", t.IsDirectorySeparator, 19], ["GetInvalidPathChars", t.GetInvalidPathChars, 22], ["GetInvalidFileNameChars", t.GetInvalidFileNameChars, 22], ["GetExtension", t.GetExtension, 22], ["GetFullPath", t.GetFullPath, 22], ["GetFileName", t.GetFileName, 22], ["GetFileNameWithoutExtension", t.GetFileNameWithoutExtension, 22], ["GetPathRoot", t.GetPathRoot, 22], ["HasExtension", t.HasExtension, 22], ["IsPathRooted", t.IsPathRooted, 22], ["Combine", t.Combine$1, 22], ["Combine", t.Combine$2, 22], ["Combine", t.Combine$3, 22], ["Combine", t.Combine, 22], ["HasIllegalCharacters", t.HasIllegalCharacters, 19], ["CheckInvalidPathChars", t.CheckInvalidPathChars, 19]]]; }; | |
$t.cctor = function() { | |
$t.DirectorySeparatorChar = 92 /*'\\'*/; | |
$t.AltDirectorySeparatorChar = 47 /*'/'*/; | |
$t.VolumeSeparatorChar = 58 /*':'*/; | |
$t.PathSeparator = 59 /*';'*/; | |
$t.InvalidPathChars = $t.GetInvalidPathChars(); | |
$t.TrimEndChars = $d.array(System.Char, [9, 10, 11, 12, 13, 32, 133, 160]); | |
$t.MaxPath = 260; | |
$t.MaxDirectoryLength = 255; | |
}; | |
$t.ChangeExtension = function Path_ChangeExtension(path, extension) { | |
if (path != null) { | |
$t.CheckInvalidPathChars(path); | |
var s = path; | |
for (var i = path.length; --i >= 0; ) { | |
var ch = path.get_Chars(i); | |
if (ch == 46 /*'.'*/) { | |
s = path.Substring$1(0, i); | |
break; | |
} | |
if (ch == 92 /*'\\'*/ || ch == 47 /*'/'*/ || ch == 58 /*':'*/) | |
break; | |
} | |
if (extension != null && path.length != 0) { | |
if (extension.length == 0 || extension.get_Chars(0) != 46 /*'.'*/) | |
s = s + "."; | |
s = s + extension; | |
} | |
return s; | |
} | |
return null; | |
}; | |
$t.GetDirectoryName = function Path_GetDirectoryName(path) { | |
if (path != null) { | |
$t.CheckInvalidPathChars(path); | |
var root = $t.GetRootLength(path); | |
var i = path.length; | |
if (i > root) { | |
i = path.length; | |
if (i == root) | |
return null; | |
while (i > root && path.get_Chars(--i) != 92 /*'\\'*/ && path.get_Chars(i) != 47 /*'/'*/) { | |
; | |
} | |
var dir = path.Substring$1(0, i); | |
return dir; | |
} | |
} | |
return null; | |
}; | |
$t.GetRootLength = function Path_GetRootLength(path) { | |
var i = 0; | |
var length = path.length; | |
if (length >= 1 && ($t.IsDirectorySeparator(path.get_Chars(0)))) { | |
i = 1; | |
if (length >= 2 && ($t.IsDirectorySeparator(path.get_Chars(1)))) { | |
i = 2; | |
var n = 2; | |
while (i < length && ((path.get_Chars(i) != 92 /*'\\'*/ && path.get_Chars(i) != 47 /*'/'*/) || --n > 0)) { | |
i++; | |
} | |
} | |
} | |
else | |
if (length >= 2 && path.get_Chars(1) == 58 /*':'*/) { | |
i = 2; | |
if (length >= 3 && ($t.IsDirectorySeparator(path.get_Chars(2)))) | |
i++; | |
} | |
return i; | |
}; | |
$t.IsDirectorySeparator = function Path_IsDirectorySeparator(c) { | |
return (c == 92 /*'\\'*/ || c == 47 /*'/'*/); | |
}; | |
$t.GetInvalidPathChars = function Path_GetInvalidPathChars() { | |
return $d.array(System.Char, [34 /*'"'*/, 60 /*'<'*/, 62 /*'>'*/, 124 /*'|'*/, 0, 1, 2, 3, 4, | |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
29, 30, 31]); | |
}; | |
$t.GetInvalidFileNameChars = function Path_GetInvalidFileNameChars() { | |
return $d.array(System.Char, [34 /*'"'*/, 60 /*'<'*/, 62 /*'>'*/, 124 /*'|'*/, 0, 1, 2, 3, 4, | |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
29, 30, 31, 58 /*':'*/, 42 /*'*'*/, 63 /*'?'*/, 92 /*'\\'*/, 47 /*'/'*/]); | |
}; | |
$t.GetExtension = function Path_GetExtension(path) { | |
if (path == null) | |
return null; | |
$t.CheckInvalidPathChars(path); | |
var length = path.length; | |
for (var i = length; --i >= 0; ) { | |
var ch = path.get_Chars(i); | |
if (ch == 46 /*'.'*/) | |
return (i != length - 1) ? path.Substring$1(i, length - i) : String.Empty; | |
if (ch == 92 /*'\\'*/ || ch == 47 /*'/'*/ || ch == 58 /*':'*/) | |
break; | |
} | |
return String.Empty; | |
}; | |
$t.GetFullPath = function Path_GetFullPath(path) { | |
if (path == null) | |
throw new System.ArgumentNullException.ctor$1("path"); | |
path = path.TrimEnd($t().TrimEndChars); | |
$t.CheckInvalidPathChars(path); | |
var index = 0; | |
var newBuffer = new System.Text.StringBuilder.ctor$3(0, $t().MaxPath); | |
var numSpaces = 0; | |
var numDots = 0; | |
var fixupDirectorySeparator = false; | |
var numSigChars = 0; | |
var lastSigChar = -1; | |
var startedWithVolumeSeparator = false; | |
var firstSegment = true; | |
var lastDirectorySeparatorPos = 0; | |
if (path.length > 0 && (path.get_Chars(0) == 92 /*'\\'*/ || path.get_Chars(0) == 47 /*'/'*/)) { | |
newBuffer.Append$2(92 /*'\\'*/); | |
index++; | |
lastSigChar = 0; | |
} | |
while (index < path.length) { | |
var currentChar = path.get_Chars(index); | |
if (currentChar == 92 /*'\\'*/ || currentChar == 47 /*'/'*/) { | |
if (numSigChars == 0) { | |
if (numDots > 0) { | |
var start = lastSigChar + 1; | |
if (path.get_Chars(start) != 46 /*'.'*/) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
if (numDots >= 2) { | |
if (startedWithVolumeSeparator && numDots > 2) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
if (path.get_Chars(start + 1) == 46 /*'.'*/) { | |
for (var i = start + 2; i < start + numDots; i++) { | |
if (path.get_Chars(i) != 46 /*'.'*/) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
} | |
numDots = 2; | |
} | |
else { | |
if (numDots > 1) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
numDots = 1; | |
} | |
} | |
if (numDots == 2) | |
newBuffer.Append$2(46 /*'.'*/); | |
newBuffer.Append$2(46 /*'.'*/); | |
fixupDirectorySeparator = false; | |
} | |
if (numSpaces > 0 && firstSegment) { | |
if (index + 1 < path.length && (path.get_Chars(index + 1) == 92 /*'\\'*/ || path.get_Chars(index + 1) == 47 /*'/'*/)) { | |
newBuffer.Append$2(92 /*'\\'*/); | |
} | |
} | |
} | |
numDots = 0; | |
numSpaces = 0; | |
if (!fixupDirectorySeparator) { | |
fixupDirectorySeparator = true; | |
newBuffer.Append$2(92 /*'\\'*/); | |
} | |
numSigChars = 0; | |
lastSigChar = index; | |
startedWithVolumeSeparator = false; | |
firstSegment = false; | |
var thisPos = newBuffer.get_Length() - 1; | |
if (thisPos - lastDirectorySeparatorPos > $t().MaxDirectoryLength) | |
throw new System.IO.PathTooLongException.ctor(System.Environment.GetResourceString("IO.PathTooLong")); | |
lastDirectorySeparatorPos = thisPos; | |
} | |
else | |
if (currentChar == 46 /*'.'*/) { | |
numDots++; | |
} | |
else | |
if (currentChar == 32 /*' '*/) { | |
numSpaces++; | |
} | |
else { | |
fixupDirectorySeparator = false; | |
if (firstSegment && currentChar == 58 /*':'*/) { | |
var driveLetter = (index > 0) ? path.get_Chars(index - 1) : 32 /*' '*/; | |
var validPath = ((numDots == 0) && (numSigChars >= 1) && (driveLetter != 32 /*' '*/)); | |
if (!validPath) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
startedWithVolumeSeparator = true; | |
if (numSigChars > 1) { | |
var spaceCount = 0; | |
while ((spaceCount < newBuffer.get_Length()) && newBuffer.get_Item(spaceCount) == 32 /*' '*/) { | |
spaceCount++; | |
} | |
if (numSigChars - spaceCount == 1) { | |
newBuffer.set_Length(0); | |
newBuffer.Append$2(driveLetter); | |
} | |
} | |
numSigChars = 0; | |
} | |
else { | |
numSigChars += 1 + numDots + numSpaces; | |
} | |
if (numDots > 0 || numSpaces > 0) { | |
var numCharsToCopy = (lastSigChar >= 0) ? index - lastSigChar - 1 : index; | |
if (numCharsToCopy > 0) { | |
for (var i = 0; i < numCharsToCopy; i++) { | |
newBuffer.Append$2(path.get_Chars(lastSigChar + 1 + i)); | |
} | |
} | |
numDots = 0; | |
numSpaces = 0; | |
} | |
newBuffer.Append$2(currentChar); | |
lastSigChar = index; | |
} | |
index++; | |
} | |
if (newBuffer.get_Length() - 1 - lastDirectorySeparatorPos > $t().MaxDirectoryLength) | |
throw new System.IO.PathTooLongException.ctor(System.Environment.GetResourceString("IO.PathTooLong")); | |
if (numSigChars == 0) { | |
if (numDots > 0) { | |
var start = lastSigChar + 1; | |
if (path.get_Chars(start) != 46 /*'.'*/) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
if (numDots >= 2) { | |
if (startedWithVolumeSeparator && numDots > 2) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
if (path.get_Chars(start + 1) == 46 /*'.'*/) { | |
for (var i = start + 2; i < start + numDots; i++) { | |
if (path.get_Chars(i) != 46 /*'.'*/) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
} | |
numDots = 2; | |
} | |
else { | |
if (numDots > 1) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
numDots = 1; | |
} | |
} | |
if (numDots == 2) | |
newBuffer.Append$2(46 /*'.'*/); | |
newBuffer.Append$2(46 /*'.'*/); | |
} | |
} | |
if (newBuffer.get_Length() == 0) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegal")); | |
var buf = newBuffer.toString(); | |
if (buf.StartsWith("http:") || buf.StartsWith("file:")) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Argument_PathUriFormatNotSupported")); | |
var result = 0; | |
if (newBuffer.get_Length() > 1 && newBuffer.get_Item(0) == 92 /*'\\'*/ && newBuffer.get_Item(1) == 92 /*'\\'*/) { | |
var startIndex = 2; | |
while (startIndex < result) { | |
if (newBuffer.get_Item(startIndex++) == 92 /*'\\'*/) | |
break; | |
} | |
if (startIndex == result) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathIllegalUNC")); | |
if (newBuffer.toString().StartsWith$1("\\\\?\\globalroot", 5)) | |
throw new System.ArgumentException.ctor$1(System.Environment.GetResourceString("Arg_PathGlobalRoot")); | |
} | |
if (newBuffer.get_Length() >= $t().MaxPath) | |
throw new System.IO.PathTooLongException.ctor(System.Environment.GetResourceString("IO.PathTooLong")); | |
var returnVal = newBuffer.toString(); | |
returnVal = $t.FixComponents(returnVal); | |
if (String.Equals(returnVal, path, 4)) | |
returnVal = path; | |
return returnVal; | |
}; | |
$t.FixComponents = function Path_FixComponents(path) { | |
var components = new (System.Collections.Generic.List$1(String).ctor)(); | |
var root = $t.GetPathRoot(path); | |
if (!$t.IsDirectorySeparator(root.get_Chars(root.length - 1)) && root.length < path.length) | |
root = path.Substring$1(0, root.length + 1); | |
if (root.length == path.length) | |
return path; | |
components.Add(path.Substring$1(0, root.length)); | |
var lastIndex = root.length - 1; | |
for (var k = root.length; k < path.length; ++k) { | |
if ($t.IsDirectorySeparator(path.get_Chars(k)) || k == path.length - 1) { | |
var component = path.Substring$1(lastIndex + 1, k - lastIndex); | |
lastIndex = k; | |
var trimmed = component.TrimEnd($d.array(System.Char, [92 /*'\\'*/, 47 /*'/'*/])); | |
if (trimmed == "..") { | |
if (components.get_Count() > 1) | |
components.RemoveAt(components.get_Count() - 1); | |
} | |
else | |
if (trimmed != ".") { | |
components.Add(component); | |
} | |
} | |
} | |
return String.Join$1(String, "", components); | |
}; | |
$t.GetFileName = function Path_GetFileName(path) { | |
if (path == null) | |
return null; | |
$t.CheckInvalidPathChars(path); | |
for (var i = path.length; --i >= 0; ) { | |
var ch = path.get_Chars(i); | |
if (ch == 92 /*'\\'*/ || ch == 47 /*'/'*/ || ch == 58 /*':'*/) | |
return path.Substring$1(i + 1, path.length - i - 1); | |
} | |
return path; | |
}; | |
$t.GetFileNameWithoutExtension = function Path_GetFileNameWithoutExtension(path) { | |
if (path == null) | |
return null; | |
path = $t.GetFileName(path); | |
var i; | |
if ((i = path.LastIndexOf(46 /*'.'*/)) == -1) | |
return path; | |
else | |
return path.Substring$1(0, i); | |
}; | |
$t.GetPathRoot = function Path_GetPathRoot(path) { | |
if (path == null) | |
return null; | |
$t.CheckInvalidPathChars(path); | |
return path.Substring$1(0, $t.GetRootLength(path)); | |
}; | |
$t.HasExtension = function Path_HasExtension(path) { | |
if (path != null) { | |
$t.CheckInvalidPathChars(path); | |
for (var i = path.length; --i >= 0; ) { | |
var ch = path.get_Chars(i); | |
if (ch == 46 /*'.'*/) | |
return (i != path.length - 1); | |
if (ch == 92 /*'\\'*/ || ch == 47 /*'/'*/ || ch == 58 /*':'*/) | |
break; | |
} | |
} | |
return false; | |
}; | |
$t.IsPathRooted = function Path_IsPathRooted(path) { | |
if (path != null) { | |
$t.CheckInvalidPathChars(path); | |
var length = path.length; | |
return (length >= 1 && (path.get_Chars(0) == 92 /*'\\'*/ || path.get_Chars(0) == 47 /*'/'*/)) || (length >= 2 && path.get_Chars(1) == 58 /*':'*/); | |
} | |
return false; | |
}; | |
$t.Combine$1 = function Path_Combine(path1, path2) { | |
if (path1 == null) | |
throw new System.ArgumentNullException.ctor$1("path1"); | |
if (path2 == null) | |
throw new System.ArgumentNullException.ctor$1("path2"); | |
$t.CheckInvalidPathChars(path1); | |
$t.CheckInvalidPathChars(path2); | |
if (path2.length == 0) | |
return path1; | |
if (path1.length == 0) | |
return path2; | |
if ($t.IsPathRooted(path2)) | |
return path2; | |
var ch = path1.get_Chars(path1.length - 1); | |
if (ch != 92 /*'\\'*/ && ch != 47 /*'/'*/ && ch != 58 /*':'*/) | |
return path1 + String.fromCharCode(92 /*'\\'*/) + path2; | |
else | |
return path1 + path2; | |
}; | |
$t.Combine$2 = function Path_Combine(path1, path2, path3) { | |
return $t.Combine($d.array(String, [path1, path2, path3])); | |
}; | |
$t.Combine$3 = function Path_Combine(path1, path2, path3, path4) { | |
return $t.Combine($d.array(String, [path1, path2, path3, path4])); | |
}; | |
$t.Combine = function Path_Combine(paths) { | |
if (paths == null) | |
throw new System.ArgumentNullException.ctor$1("paths"); | |
var lastIsSeparator = false; | |
var result = new System.Text.StringBuilder.ctor(); | |
for (var $i = 0, $length = paths.length; $i != $length; $i++) { | |
var path = paths[$i]; | |
if (path == null) | |
throw new System.ArgumentNullException.ctor$1("paths"); | |
if (path.length == 0) { | |
lastIsSeparator = false; | |
continue; | |
} | |
$t.CheckInvalidPathChars(path); | |
if ($t.IsPathRooted(path)) | |
result.Clear(); | |
if (result.get_Length() > 0 && !lastIsSeparator) | |
result.Append$2(92 /*'\\'*/); | |
result.Append$12(path); | |
var ch = path.get_Chars(path.length - 1); | |
lastIsSeparator = (ch == 92 /*'\\'*/ || ch == 47 /*'/'*/ || ch == 58 /*':'*/); | |
} | |
return result.toString(); | |
}; | |
$t.HasIllegalCharacters = function Path_HasIllegalCharacters(path) { | |
for (var i = 0; i < path.length; i++) { | |
var c = path.get_Chars(i); | |
if (c == 34 /*'"'*/ || c == 60 /*'<'*/ || c == 62 /*'>'*/ || c == 124 /*'|'*/ || c < 32) | |
return true; | |
} | |
return false; | |
}; | |
$t.CheckInvalidPathChars = function Path_CheckInvalidPathChars(path) { | |
if (path == null) | |
throw new System.ArgumentNullException.ctor$1("path"); | |
if ($t.HasIllegalCharacters(path)) | |
throw new System.ArgumentException.ctor$1("Argument_InvalidPathChars"); | |
}; | |
}); | |
System.IO.PathTooLongException = $d.declare("System.IO.PathTooLongException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function PathTooLongException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.IO.SeekOrigin = $d.declareEnum("System.IO.SeekOrigin", 45, $asm, 257, ["Begin", "Current", "End"], [0, 1, 2]); | |
System.IO.Stream.NullStream = $d.declare("NullStream", System.IO.Stream, 0, System.IO.Stream, function($t, $p) { | |
$t.$intfs = [System.IDisposable]; | |
$t.$typeInfo = function(t, p) { return [259, null, [["get_CanRead", p.get_CanRead, 6], ["get_CanWrite", p.get_CanWrite, 6], ["get_CanSeek", p.get_CanSeek, 6], ["get_Length", p.get_Length, 6], ["get_Position", p.get_Position, 6], ["set_Position", p.set_Position, 6], ["Dispose", p.Dispose$1, 4], ["Flush", p.Flush, 6], ["Read", p.Read, 6], ["ReadByte", p.ReadByte, 6], ["Write", p.Write, 6], ["WriteByte", p.WriteByte, 6], ["Seek", p.Seek, 6], ["SetLength", p.SetLength, 6]], [["ctor", t.ctor, 3]], [["CanRead", 39, 0], ["CanWrite", 39, 1], ["CanSeek", 39, 2], ["Length", 47, 3], ["Position", 47, 4, 5]]]; }; | |
$t.ctor = function NullStream() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_CanRead = function NullStream_get_CanRead() { | |
return true; | |
}; | |
$p.get_CanWrite = function NullStream_get_CanWrite() { | |
return true; | |
}; | |
$p.get_CanSeek = function NullStream_get_CanSeek() { | |
return true; | |
}; | |
$p.get_Length = function NullStream_get_Length() { | |
return 0; | |
}; | |
$p.get_Position = function NullStream_get_Position() { | |
return 0; | |
}; | |
$p.set_Position = function NullStream_set_Position(value) { | |
return value; | |
}; | |
$p.Dispose$1 = function NullStream_Dispose(disposing) {}; | |
$p.Flush = function NullStream_Flush() {}; | |
$p.Read = function NullStream_Read(buffer, offset, count) { | |
return 0; | |
}; | |
$p.ReadByte = function NullStream_ReadByte() { | |
return -1; | |
}; | |
$p.Write = function NullStream_Write(buffer, offset, count) {}; | |
$p.WriteByte = function NullStream_WriteByte(value) {}; | |
$p.Seek = function NullStream_Seek(offset, origin) { | |
return 0; | |
}; | |
$p.SetLength = function NullStream_SetLength(length) {}; | |
}); | |
System.IO.__Error = $d.declare("System.IO.__Error", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [0, null, [["EndOfFile", t.EndOfFile, 19], ["FileNotOpen", t.FileNotOpen, 19], ["PipeNotOpen", t.PipeNotOpen, 19], ["StreamIsClosed", t.StreamIsClosed, 19], ["ReadNotSupported", t.ReadNotSupported, 19], ["SeekNotSupported", t.SeekNotSupported, 19], ["WrongAsyncResult", t.WrongAsyncResult, 19], ["EndReadCalledTwice", t.EndReadCalledTwice, 19], ["EndWriteCalledTwice", t.EndWriteCalledTwice, 19], ["EndWaitForConnectionCalledTwice", t.EndWaitForConnectionCalledTwice, 19], ["WriteNotSupported", t.WriteNotSupported, 19], ["MemoryStreamNotExpandable", t.MemoryStreamNotExpandable, 19]]]; }; | |
$t.EndOfFile = function __Error_EndOfFile() { | |
throw new System.Exception.ctor$1("IO_EOF_ReadBeyondEOF"); | |
}; | |
$t.FileNotOpen = function __Error_FileNotOpen() { | |
throw new System.ObjectDisposedException.ctor$3(null, "ObjectDisposed_FileClosed"); | |
}; | |
$t.PipeNotOpen = function __Error_PipeNotOpen() { | |
throw new System.ObjectDisposedException.ctor$3(null, "ObjectDisposed_PipeClosed"); | |
}; | |
$t.StreamIsClosed = function __Error_StreamIsClosed() { | |
throw new System.ObjectDisposedException.ctor$3(null, "ObjectDisposed_StreamIsClosed"); | |
}; | |
$t.ReadNotSupported = function __Error_ReadNotSupported() { | |
throw new System.NotSupportedException.ctor$1("NotSupported_UnreadableStream"); | |
}; | |
$t.SeekNotSupported = function __Error_SeekNotSupported() { | |
throw new System.NotSupportedException.ctor$1("NotSupported_UnseekableStream"); | |
}; | |
$t.WrongAsyncResult = function __Error_WrongAsyncResult() { | |
throw new System.ArgumentException.ctor$1("Argument_WrongAsyncResult"); | |
}; | |
$t.EndReadCalledTwice = function __Error_EndReadCalledTwice() { | |
throw new System.ArgumentException.ctor$1("InvalidOperation_EndReadCalledMultiple"); | |
}; | |
$t.EndWriteCalledTwice = function __Error_EndWriteCalledTwice() { | |
throw new System.ArgumentException.ctor$1("InvalidOperation_EndWriteCalledMultiple"); | |
}; | |
$t.EndWaitForConnectionCalledTwice = function __Error_EndWaitForConnectionCalledTwice() { | |
throw new System.ArgumentException.ctor$1("InvalidOperation_EndWaitForConnectionCalledMultiple"); | |
}; | |
$t.WriteNotSupported = function __Error_WriteNotSupported() { | |
throw new System.NotSupportedException.ctor$1("NotSupported_UnwritableStream"); | |
}; | |
$t.MemoryStreamNotExpandable = function __Error_MemoryStreamNotExpandable() { | |
throw new System.NotSupportedException.ctor$1("MemoryStreamNotExpandable"); | |
}; | |
}); | |
System.IServiceProvider = $d.declare("System.IServiceProvider", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetService", null, 6]]]; }; | |
}); | |
System.LazyThreadSafetyMode = $d.declareEnum("System.LazyThreadSafetyMode", 45, $asm, 257, ["ExecutionAndPublication"], [0]); | |
System.Lazy$1 = $d.declare("System.Lazy`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["ToString", p.ToString, 6], ["get_ValueForDebugDisplay", p.get_ValueForDebugDisplay, 3], ["get_Mode", p.get_Mode, 3], ["get_IsValueFaulted", p.get_IsValueFaulted, 3], ["get_IsValueCreated", p.get_IsValueCreated, 6], ["get_Value", p.get_Value, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6]], [["ValueForDebugDisplay", T, 1], ["Mode", System.LazyThreadSafetyMode, 2], ["IsValueFaulted", 39, 3], ["IsValueCreated", 39, 4], ["Value", T, 5]]]; }; | |
$t.cctor = function() { | |
$t.PUBLICATION_ONLY_OR_ALREADY_INITIALIZED = $d.delegate(function() { | |
return $d.default(T); | |
}, this); | |
}; | |
$t.$ator = function() { | |
this.m_boxed = null; | |
this.m_valueFactory = null; | |
this.m_threadSafeObj = null; | |
}; | |
$t.ctor = function Lazy$1() { | |
$t.ctor$2.call(this, 0); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function Lazy$1(valueFactory) { | |
$t.ctor$3.call(this, valueFactory, 0); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function Lazy$1(mode) { | |
$t.$baseType.ctor.call(this); | |
this.m_threadSafeObj = $t.GetObjectFromMode(mode); | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function Lazy$1(valueFactory, mode) { | |
$t.$baseType.ctor.call(this); | |
if (valueFactory == null) | |
throw new System.ArgumentNullException.ctor$1("valueFactory"); | |
this.m_threadSafeObj = $t.GetObjectFromMode(mode); | |
this.m_valueFactory = valueFactory; | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.GetObjectFromMode = function Lazy$1_GetObjectFromMode(mode) { | |
if (mode == 0) | |
return new System.Object.ctor(); | |
return null; | |
}; | |
$p.ToString = function Lazy$1_ToString() { | |
return this.get_IsValueCreated() ? this.get_Value().toString() : "Lazy_ToString_ValueNotCreated"; | |
}; | |
$p.get_ValueForDebugDisplay = function Lazy$1_get_ValueForDebugDisplay() { | |
if (!this.get_IsValueCreated()) { | |
return $d.default(T); | |
} | |
return ($d.cast(this.m_boxed, System.Lazy$1.Boxed(T))).m_value; | |
}; | |
$p.get_Mode = function Lazy$1_get_Mode() { | |
return 0; | |
}; | |
$p.get_IsValueFaulted = function Lazy$1_get_IsValueFaulted() { | |
return $d.is(this.m_boxed, System.Lazy$1.LazyInternalExceptionHolder(T)); | |
}; | |
$p.get_IsValueCreated = function Lazy$1_get_IsValueCreated() { | |
return this.m_boxed != null && $d.is(this.m_boxed, System.Lazy$1.Boxed(T)); | |
}; | |
$p.get_Value = function Lazy$1_get_Value() { | |
var boxed = null; | |
if (this.m_boxed != null) { | |
boxed = $d.as(this.m_boxed, System.Lazy$1.Boxed(T)); | |
if (boxed != null) { | |
return boxed.m_value; | |
} | |
var exc = $d.as(this.m_boxed, System.Lazy$1.LazyInternalExceptionHolder(T)); | |
System.Diagnostics.Debug.Assert(this.m_boxed != null); | |
throw $d.signEx(exc.m_exception); | |
} | |
return this.LazyInitValue(); | |
}; | |
$p.LazyInitValue = function Lazy$1_LazyInitValue() { | |
var boxed = null; | |
var mode = this.get_Mode(); | |
if (this.m_boxed == null) { | |
boxed = this.CreateValue(); | |
this.m_boxed = boxed; | |
} | |
else { | |
boxed = $d.as(this.m_boxed, System.Lazy$1.Boxed(T)); | |
if (boxed == null) { | |
var exHolder = $d.as(this.m_boxed, System.Lazy$1.LazyInternalExceptionHolder(T)); | |
System.Diagnostics.Debug.Assert(exHolder != null); | |
throw $d.signEx(exHolder.m_exception); | |
} | |
} | |
System.Diagnostics.Debug.Assert(boxed != null); | |
return boxed.m_value; | |
}; | |
$p.CreateValue = function Lazy$1_CreateValue() { | |
var boxed = null; | |
var mode = this.get_Mode(); | |
if (this.m_valueFactory != null) { | |
try { | |
if (System.Delegate.op_Equality(this.m_valueFactory, $t.PUBLICATION_ONLY_OR_ALREADY_INITIALIZED)) | |
throw new System.InvalidOperationException.ctor$1("Lazy_Value_RecursiveCallsToValue"); | |
var factory = this.m_valueFactory; | |
this.m_valueFactory = $t.PUBLICATION_ONLY_OR_ALREADY_INITIALIZED; | |
boxed = new (System.Lazy$1.Boxed(T).ctor)(factory()); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
this.m_boxed = new (System.Lazy$1.LazyInternalExceptionHolder(T).ctor)($e); | |
throw $e; | |
} | |
} | |
else { | |
boxed = new (System.Lazy$1.Boxed(T).ctor)($d.cast(System.Activator.CreateInstance($d.typeOf(T)), | |
T)); | |
} | |
return boxed; | |
}; | |
}, ["T"]); | |
System.Lazy$1.Boxed = $d.declare("Boxed", System.Object, 256, System.Lazy$1, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [3, [["m_value", T, 3]], null, [["ctor", t.ctor, 3]]]; }; | |
$t.$ator = function() { | |
this.m_value = $d.default(T); | |
}; | |
$t.ctor = function Boxed(value) { | |
$t.$baseType.ctor.call(this); | |
this.m_value = value; | |
}; | |
$t.ctor.prototype = $p; | |
}, ["T"]); | |
System.Lazy$1.LazyInternalExceptionHolder = $d.declare("LazyInternalExceptionHolder", System.Object, 256, System.Lazy$1, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [3, [["m_exception", 28, 3]], null, [["ctor", t.ctor, 3]]]; }; | |
$t.$ator = function() { | |
this.m_exception = null; | |
}; | |
$t.ctor = function LazyInternalExceptionHolder(ex) { | |
$t.$baseType.ctor.call(this); | |
this.m_exception = ex; | |
}; | |
$t.ctor.prototype = $p; | |
}, ["T"]); | |
System.System_LazyDebugView$1 = $d.declare("System.System_LazyDebugView`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [256, null, [["get_IsValueCreated", p.get_IsValueCreated, 6], ["get_Value", p.get_Value, 6], ["get_Mode", p.get_Mode, 6], ["get_IsValueFaulted", p.get_IsValueFaulted, 6]], [["ctor", t.ctor, 6]], [["IsValueCreated", 39, 0], ["Value", T, 1], ["Mode", System.LazyThreadSafetyMode, 2], ["IsValueFaulted", 39, 3]]]; }; | |
$t.$ator = function() { | |
this.m_lazy = null; | |
}; | |
$t.ctor = function System_LazyDebugView$1(lazy) { | |
$t.$baseType.ctor.call(this); | |
this.m_lazy = lazy; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_IsValueCreated = function System_LazyDebugView$1_get_IsValueCreated() { | |
return this.m_lazy.get_IsValueCreated(); | |
}; | |
$p.get_Value = function System_LazyDebugView$1_get_Value() { | |
return this.m_lazy.get_ValueForDebugDisplay(); | |
}; | |
$p.get_Mode = function System_LazyDebugView$1_get_Mode() { | |
return this.m_lazy.get_Mode(); | |
}; | |
$p.get_IsValueFaulted = function System_LazyDebugView$1_get_IsValueFaulted() { | |
return this.m_lazy.get_IsValueFaulted(); | |
}; | |
}, ["T"]); | |
System.Linq.Enumerable = $d.declare("System.Linq.Enumerable", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Aggregate", t.Aggregate, 22], ["Aggregate", t.Aggregate$1, 22], ["Aggregate", t.Aggregate$2, 22], ["All", t.All, 22], ["Where", t.Where, 22], ["Where", t.Where$1, 22], ["First", t.First$1, 22], ["FirstOrDefault", t.FirstOrDefault$1, 22], ["First", t.First, 22], ["FirstOrDefault", t.FirstOrDefault, 22], ["FirstOrDefault", t.FirstOrDefault$2, 22], ["Last", t.Last$1, 22], ["LastOrDefault", t.LastOrDefault$1, 22], ["Last", t.Last, 22], ["LastOrDefault", t.LastOrDefault, 22], ["LastOrDefault", t.LastOrDefault$2, 22], ["Single", t.Single$1, 22], ["SingleOrDefault", t.SingleOrDefault$1, 22], ["Single", t.Single, 22], ["SingleOrDefault", t.SingleOrDefault, 22], ["SingleOrDefault", t.SingleOrDefault$2, 22], ["ToArray", t.ToArray, 22], ["ToJsArray", t.ToJsArray, 19], ["ToList", t.ToList, 22], ["Select", t.Select, 22], ["Select", t.Select$1, 22], ["SelectMany", t.SelectMany, 22], ["SelectMany", t.SelectMany$1, 22], ["SelectMany", t.SelectMany$3, 22], ["SelectMany", t.SelectMany$2, 22], ["Take", t.Take, 22], ["TakeWhile", t.TakeWhile, 22], ["TakeWhile", t.TakeWhile$1, 22], ["Skip", t.Skip, 22], ["SkipWhile", t.SkipWhile, 22], ["SkipWhile", t.SkipWhile$1, 22], ["Join", t.Join, 22], ["Any", t.Any, 22], ["Any", t.Any$1, 22], ["Max", t.Max, 22], ["Min", t.Min, 22], ["Concat", t.Concat, 22], ["Sum", t.Sum, 22], ["Sum", t.Sum$1, 22], ["Sum", t.Sum$2, 22], ["Repeat", t.Repeat, 22], ["Reverse", t.Reverse, 22], ["ToDictionary", t.ToDictionary, 22], ["ToDictionary", t.ToDictionary$1, 22], ["SequenceEqual", t.SequenceEqual, 22], ["SequenceEqual", t.SequenceEqual$1, 22], ["Cast", t.Cast, 22], ["OrderBy", t.OrderBy, 22], ["OrderBy", t.OrderBy$1, 22], ["OrderByDescending", t.OrderByDescending, 22], ["OrderByDescending", t.OrderByDescending$1, 22], ["ThenBy", t.ThenBy, 22], ["ThenBy", t.ThenBy$1, 22], ["ThenByDescending", t.ThenByDescending, 22], ["ThenByDescending", t.ThenByDescending$1, 22], ["OfType", t.OfType, 22], ["Empty", t.Empty, 22], ["DefaultIfEmpty", t.DefaultIfEmpty, 22], ["DefaultIfEmpty", t.DefaultIfEmpty$1, 22], ["GroupBy", t.GroupBy, 22], ["GroupBy", t.GroupBy$1, 22], ["GroupBy", t.GroupBy$3, 22], ["GroupBy", t.GroupBy$5, 22], ["GroupBy", t.GroupBy$2, 22], ["GroupBy", t.GroupBy$6, 22], ["GroupBy", t.GroupBy$4, 22], ["GroupBy", t.GroupBy$7, 22], ["ToLookup", t.ToLookup, 22], ["ToLookup", t.ToLookup$1, 22], ["ToLookup", t.ToLookup$2, 22], ["ToLookup", t.ToLookup$3, 22], ["Distinct", t.Distinct, 22], ["Distinct", t.Distinct$1, 22], ["ElementAt", t.ElementAt, 22], ["ElementAtOrDefault", t.ElementAtOrDefault, 22], ["Range", t.Range, 22], ["Zip", t.Zip, 22], ["Union", t.Union, 22], ["Union", t.Union$1, 22], ["Intersect", t.Intersect, 22], ["Intersect", t.Intersect$1, 22], ["Average", t.Average$6, 22], ["Average", t.Average$1, 22], ["Average", t.Average, 22], ["Average", t.Average$7, 22], ["Average", t.Average$5, 22], ["Average", t.Average$4, 22], ["Average", t.Average$3, 22], ["Average", t.Average$2, 22], ["Count", t.Count, 22], ["Count", t.Count$1, 22], ["LongCount", t.LongCount, 22], ["LongCount", t.LongCount$1, 22], ["Contains", t.Contains, 22], ["Contains", t.Contains$1, 22], ["Except", t.Except, 22], ["Except", t.Except$1, 22]]]; }; | |
$t.Aggregate = function Enumerable_Aggregate(TSource, source, func) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (func == null) | |
throw new System.ArgumentNullException.ctor$1("func"); | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
try { | |
if (!enumerator.System$Collections$IEnumerator$MoveNext()) | |
throw new System.InvalidOperationException.ctor$1("No elements"); | |
var current = enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
while (enumerator.System$Collections$IEnumerator$MoveNext()) { | |
current = func(current, enumerator.System$Collections$Generic$IEnumerator$1$get_Current()); | |
} | |
return current; | |
} | |
finally { | |
enumerator.System$IDisposable$Dispose(); | |
} | |
}; | |
$t.Aggregate$1 = function Enumerable_Aggregate(TSource, TAccumulate, source, seed, func) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (func == null) | |
throw new System.ArgumentNullException.ctor$1("func"); | |
var accumulate = seed; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var current = $enumerator.System$Collections$IEnumerator$get_Current(); | |
accumulate = func(accumulate, current); | |
} | |
return accumulate; | |
}; | |
$t.Aggregate$2 = function Enumerable_Aggregate(TSource, TAccumulate, TResult, source, seed, func, resultSelector) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (func == null) | |
throw new System.ArgumentNullException.ctor$1("func"); | |
if (resultSelector == null) | |
throw new System.ArgumentNullException.ctor$1("resultSelector"); | |
var accumulate = seed; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var current = $enumerator.System$Collections$IEnumerator$get_Current(); | |
accumulate = func(accumulate, current); | |
} | |
return resultSelector(accumulate); | |
}; | |
$t.All = function Enumerable_All(TSource, source, predicate) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (predicate == null) | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var current = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (!predicate(current)) | |
return false; | |
} | |
return true; | |
}; | |
$t.Where = function Enumerable_Where(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (predicate(item)) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
$state = 1; | |
continue $top; | |
case 5: | |
$state = 6; | |
$stateMachine.set_Current(item); | |
return true; | |
case 6: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Where$1 = function Enumerable_Where(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (predicate == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (predicate(item, index)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
index++; | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 10: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.First$1 = function Enumerable_First(TSource, source, predicate) { | |
return System.Linq.Enumerable.First(TSource, System.Linq.Enumerable.Where(TSource, source, predicate)); | |
}; | |
$t.FirstOrDefault$1 = function Enumerable_FirstOrDefault(TSource, source, predicate) { | |
return System.Linq.Enumerable.FirstOrDefault(TSource, System.Linq.Enumerable.Where(TSource, source, | |
predicate)); | |
}; | |
$t.First = function Enumerable_First(TSource, source) { | |
return System.Linq.Enumerable.FirstOrDefault$2(TSource, source, $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("Sequence contains no elements"); | |
}, this)); | |
}; | |
$t.FirstOrDefault = function Enumerable_FirstOrDefault(TSource, source) { | |
return System.Linq.Enumerable.FirstOrDefault$2(TSource, source, $d.delegate(function() { | |
return $d.default(TSource); | |
}, this)); | |
}; | |
$t.FirstOrDefault$2 = function Enumerable_FirstOrDefault(TSource, source, defaultValue) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
if (!enumerator.System$Collections$IEnumerator$MoveNext()) | |
return defaultValue(); | |
var result = enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
enumerator.System$IDisposable$Dispose(); | |
return result; | |
}; | |
$t.Last$1 = function Enumerable_Last(TSource, source, predicate) { | |
return System.Linq.Enumerable.Last(TSource, System.Linq.Enumerable.Where(TSource, source, predicate)); | |
}; | |
$t.LastOrDefault$1 = function Enumerable_LastOrDefault(TSource, source, predicate) { | |
return System.Linq.Enumerable.LastOrDefault(TSource, System.Linq.Enumerable.Where(TSource, source, | |
predicate)); | |
}; | |
$t.Last = function Enumerable_Last(TSource, source) { | |
return System.Linq.Enumerable.LastOrDefault$2(TSource, source, $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("Sequence contains no elements"); | |
}, this)); | |
}; | |
$t.LastOrDefault = function Enumerable_LastOrDefault(TSource, source) { | |
return System.Linq.Enumerable.LastOrDefault$2(TSource, source, $d.delegate(function() { | |
return $d.default(TSource); | |
}, this)); | |
}; | |
$t.LastOrDefault$2 = function Enumerable_LastOrDefault(TSource, source, defaultValue) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
if (!enumerator.System$Collections$IEnumerator$MoveNext()) | |
return defaultValue(); | |
var lastValue = enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
while (enumerator.System$Collections$IEnumerator$MoveNext()) { | |
lastValue = enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
} | |
enumerator.System$IDisposable$Dispose(); | |
return lastValue; | |
}; | |
$t.Single$1 = function Enumerable_Single(TSource, source, predicate) { | |
return System.Linq.Enumerable.Single(TSource, System.Linq.Enumerable.Where(TSource, source, predicate)); | |
}; | |
$t.SingleOrDefault$1 = function Enumerable_SingleOrDefault(TSource, source, predicate) { | |
return System.Linq.Enumerable.SingleOrDefault(TSource, System.Linq.Enumerable.Where(TSource, | |
source, predicate)); | |
}; | |
$t.Single = function Enumerable_Single(TSource, source) { | |
return System.Linq.Enumerable.SingleOrDefault$2(TSource, source, $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("Sequence contains no elements"); | |
}, this)); | |
}; | |
$t.SingleOrDefault = function Enumerable_SingleOrDefault(TSource, source) { | |
return System.Linq.Enumerable.SingleOrDefault$2(TSource, source, $d.delegate(function() { | |
return $d.default(TSource); | |
}, this)); | |
}; | |
$t.SingleOrDefault$2 = function Enumerable_SingleOrDefault(TSource, source, defaultValue) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
if (!enumerator.System$Collections$IEnumerator$MoveNext()) | |
return defaultValue(); | |
var result = enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
if (enumerator.System$Collections$IEnumerator$MoveNext()) | |
throw new System.InvalidOperationException.ctor$1("Sequence contains more than one element"); | |
enumerator.System$IDisposable$Dispose(); | |
return result; | |
}; | |
$t.ToArray = function Enumerable_ToArray(TSource, source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var sa = $d.as(source, Array); | |
if (sa != null) | |
return sa.Clone(); | |
var cl = $d.as(source, System.Collections.Generic.ICollection$1(TSource)); | |
if (cl != null) { | |
var items = $d.array(TSource, cl.System$Collections$Generic$ICollection$1$get_Count()); | |
cl.System$Collections$Generic$ICollection$1$CopyTo(items, 0); | |
return items; | |
} | |
var result = new Array(); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
result.push(item); | |
} | |
return $d.array(TSource, result); | |
}; | |
$t.ToJsArray = function Enumerable_ToJsArray(TSource, source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var sa = $d.as(source, Array); | |
if (sa != null) | |
return Array.prototype.slice.call(sa); | |
var cl = $d.as(source, System.Collections.Generic.ICollection$1(TSource)); | |
if (cl != null) { | |
var items = new Array(cl.System$Collections$Generic$ICollection$1$get_Count()); | |
cl.System$Collections$Generic$ICollection$1$CopyTo(items, 0); | |
return items; | |
} | |
var result = new Array(); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
result.push(item); | |
} | |
return result; | |
}; | |
$t.ToList = function Enumerable_ToList(TSource, source) { | |
return new (System.Collections.Generic.List$1(TSource).ctor$1)(source); | |
}; | |
$t.Select = function Enumerable_Select(TSource, TResult, source, selector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 4; | |
$stateMachine.set_Current(selector(item)); | |
return true; | |
case 4: | |
$state = 1; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Select$1 = function Enumerable_Select(TSource, TResult, source, selector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (selector == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("selector"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 8; | |
$stateMachine.set_Current(selector(item, index)); | |
return true; | |
case 8: | |
index++; | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SelectMany = function Enumerable_SelectMany(TSource, TResult, source, selector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var subitem = null; | |
var subitem$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
subitem$enumerator = selector(item).System$Collections$IEnumerable$GetEnumerator(); | |
$state = 4; | |
continue $top; | |
case 4: | |
while (subitem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 5: | |
$state = 1; | |
continue $top; | |
case 6: | |
subitem = subitem$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 7; | |
$stateMachine.set_Current(subitem); | |
return true; | |
case 7: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SelectMany$1 = function Enumerable_SelectMany(TSource, TResult, source, selector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var subitem = null; | |
var subitem$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (selector == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("selector"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
subitem$enumerator = selector(item, index).System$Collections$IEnumerable$GetEnumerator(); | |
$state = 8; | |
continue $top; | |
case 8: | |
while (subitem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 10; | |
continue $top; | |
} | |
$state = 9; | |
continue $top; | |
case 9: | |
index++; | |
$state = 5; | |
continue $top; | |
case 10: | |
subitem = subitem$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 11; | |
$stateMachine.set_Current(subitem); | |
return true; | |
case 11: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SelectMany$3 = function Enumerable_SelectMany(TSource, TCollection, TResult, source, collectionSelector, resultSelector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var subitem = null; | |
var subitem$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (collectionSelector == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
if (resultSelector == null) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("collectionSelector"); | |
$state = 3; | |
continue $top; | |
case 5: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 7; | |
continue $top; | |
case 6: | |
throw new System.ArgumentNullException.ctor$1("resultSelector"); | |
$state = 5; | |
continue $top; | |
case 7: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
return false; | |
case 9: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
subitem$enumerator = collectionSelector(item, index).System$Collections$IEnumerable$GetEnumerator(); | |
$state = 10; | |
continue $top; | |
case 10: | |
while (subitem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 12; | |
continue $top; | |
} | |
$state = 11; | |
continue $top; | |
case 11: | |
index++; | |
$state = 7; | |
continue $top; | |
case 12: | |
subitem = subitem$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 13; | |
$stateMachine.set_Current(resultSelector(item, subitem)); | |
return true; | |
case 13: | |
$state = 10; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SelectMany$2 = function Enumerable_SelectMany(TSource, TCollection, TResult, source, collectionSelector, resultSelector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var subitem = null; | |
var subitem$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (collectionSelector == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
if (resultSelector == null) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("collectionSelector"); | |
$state = 3; | |
continue $top; | |
case 5: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 7; | |
continue $top; | |
case 6: | |
throw new System.ArgumentNullException.ctor$1("resultSelector"); | |
$state = 5; | |
continue $top; | |
case 7: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
return false; | |
case 9: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
subitem$enumerator = collectionSelector(item).System$Collections$IEnumerable$GetEnumerator(); | |
$state = 10; | |
continue $top; | |
case 10: | |
while (subitem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 12; | |
continue $top; | |
} | |
$state = 11; | |
continue $top; | |
case 11: | |
$state = 7; | |
continue $top; | |
case 12: | |
subitem = subitem$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 13; | |
$stateMachine.set_Current(resultSelector(item, subitem)); | |
return true; | |
case 13: | |
$state = 10; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Take = function Enumerable_Take(TSource, source, count) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
return false; | |
case 5: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (index >= count) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 8; | |
$stateMachine.set_Current(item); | |
return true; | |
case 7: | |
$state = 4; | |
continue $top; | |
case 8: | |
index++; | |
$state = 3; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.TakeWhile = function Enumerable_TakeWhile(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (predicate == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (!predicate(item)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 9: | |
$state = 6; | |
continue $top; | |
case 10: | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.TakeWhile$1 = function Enumerable_TakeWhile(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (predicate == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
index = 0; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (!predicate(item, index)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 9: | |
$state = 6; | |
continue $top; | |
case 10: | |
index++; | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Skip = function Enumerable_Skip(TSource, source, count) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
index = -1; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
return false; | |
case 5: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
index++; | |
if (index < count) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 8; | |
$stateMachine.set_Current(item); | |
return true; | |
case 7: | |
$state = 3; | |
continue $top; | |
case 8: | |
$state = 3; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SkipWhile = function Enumerable_SkipWhile(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (predicate == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (predicate(item)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 9: | |
$state = 5; | |
continue $top; | |
case 10: | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.SkipWhile$1 = function Enumerable_SkipWhile(TSource, source, predicate) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var index = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (predicate == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
index = -1; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
index++; | |
if (predicate(item, index)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 9: | |
$state = 5; | |
continue $top; | |
case 10: | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Join = function Enumerable_Join(TOuter, TInner, TKey, TResult, outer, inner, outerKeySelector, innerKeySelector, resultSelector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var outers = null; | |
var dictionary = null; | |
var item = null; | |
var item$enumerator = null; | |
var key = null; | |
var lists = null; | |
var item2 = null; | |
var item2$enumerator = null; | |
var key2 = null; | |
var lists2 = null; | |
var outerItem = null; | |
var outerItem$enumerator = null; | |
var key3 = null; | |
var set = null; | |
var innerItem = null; | |
var innerItem$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
outers = System.Linq.Enumerable.ToArray(TOuter, outer); | |
if (outer == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (inner == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("outer"); | |
$state = 1; | |
continue $top; | |
case 3: | |
if (outerKeySelector == null) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("inner"); | |
$state = 3; | |
continue $top; | |
case 5: | |
if (innerKeySelector == null) { | |
$state = 8; | |
continue $top; | |
} | |
$state = 7; | |
continue $top; | |
case 6: | |
throw new System.ArgumentNullException.ctor$1("outerKeySelector"); | |
$state = 5; | |
continue $top; | |
case 7: | |
if (resultSelector == null) { | |
$state = 10; | |
continue $top; | |
} | |
$state = 9; | |
continue $top; | |
case 8: | |
throw new System.ArgumentNullException.ctor$1("innerKeySelector"); | |
$state = 7; | |
continue $top; | |
case 9: | |
dictionary = new (System.Collections.Generic.Dictionary$2(TKey, System.Tuple$2(System.Collections.Generic.List$1(TOuter), | |
System.Collections.Generic.List$1(TInner))).ctor)(); | |
item$enumerator = outers.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 11; | |
continue $top; | |
case 10: | |
throw new System.ArgumentNullException.ctor$1("resultSelector"); | |
$state = 9; | |
continue $top; | |
case 11: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 13; | |
continue $top; | |
} | |
$state = 12; | |
continue $top; | |
case 12: | |
item2$enumerator = inner.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 16; | |
continue $top; | |
case 13: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
key = outerKeySelector(item); | |
if (!(function() { | |
var $out = {}; | |
var $result$ = dictionary.TryGetValue(key, $out); | |
lists = $out.value; | |
return $result$; | |
}).call(this)) { | |
$state = 15; | |
continue $top; | |
} | |
$state = 14; | |
continue $top; | |
case 14: | |
lists.get_Item1().Add(item); | |
$state = 11; | |
continue $top; | |
case 15: | |
lists = new (System.Tuple$2(System.Collections.Generic.List$1(TOuter), System.Collections.Generic.List$1(TInner)).ctor)(new (System.Collections.Generic.List$1(TOuter).ctor)(), | |
new (System.Collections.Generic.List$1(TInner).ctor)()); | |
dictionary.set_Item(key, lists); | |
$state = 14; | |
continue $top; | |
case 16: | |
while (item2$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 18; | |
continue $top; | |
} | |
$state = 17; | |
continue $top; | |
case 17: | |
outerItem$enumerator = outers.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 21; | |
continue $top; | |
case 18: | |
item2 = item2$enumerator.System$Collections$IEnumerator$get_Current(); | |
key2 = innerKeySelector(item2); | |
if (!(function() { | |
var $out1 = {}; | |
var $result$ = dictionary.TryGetValue(key2, $out1); | |
lists2 = $out1.value; | |
return $result$; | |
}).call(this)) { | |
$state = 20; | |
continue $top; | |
} | |
$state = 19; | |
continue $top; | |
case 19: | |
lists2.get_Item2().Add(item2); | |
$state = 16; | |
continue $top; | |
case 20: | |
$state = 16; | |
continue $top; | |
case 21: | |
while (outerItem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 23; | |
continue $top; | |
} | |
$state = 22; | |
continue $top; | |
case 22: | |
return false; | |
case 23: | |
outerItem = outerItem$enumerator.System$Collections$IEnumerator$get_Current(); | |
key3 = outerKeySelector(outerItem); | |
set = dictionary.get_Item(key3); | |
innerItem$enumerator = set.get_Item2().System$Collections$IEnumerable$GetEnumerator(); | |
$state = 24; | |
continue $top; | |
case 24: | |
while (innerItem$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 26; | |
continue $top; | |
} | |
$state = 25; | |
continue $top; | |
case 25: | |
$state = 21; | |
continue $top; | |
case 26: | |
innerItem = innerItem$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 27; | |
$stateMachine.set_Current(resultSelector(outerItem, innerItem)); | |
return true; | |
case 27: | |
$state = 24; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Any = function Enumerable_Any(TSource, source) { | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
var result = enumerator.System$Collections$IEnumerator$MoveNext(); | |
enumerator.System$IDisposable$Dispose(); | |
return result; | |
}; | |
$t.Any$1 = function Enumerable_Any(TSource, source, predicate) { | |
return System.Linq.Enumerable.Any(TSource, System.Linq.Enumerable.Where(TSource, source, predicate)); | |
}; | |
$t.Max = function Enumerable_Max(TSource, source) { | |
var current = $d.default(TSource); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (item == null) | |
continue; | |
if (current == null) { | |
current = item; | |
continue; | |
} | |
var comparable = $d.as(item, System.IComparable); | |
if (comparable.System$IComparable$CompareTo(current) > 0) | |
current = item; | |
} | |
return current; | |
}; | |
$t.Min = function Enumerable_Min(TSource, source) { | |
var current = $d.default(TSource); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (item == null) | |
continue; | |
if (current == null) { | |
current = item; | |
continue; | |
} | |
var comparable = $d.as(item, System.IComparable); | |
if (comparable.System$IComparable$CompareTo(current) < 0) | |
current = item; | |
} | |
return current; | |
}; | |
$t.Concat = function Enumerable_Concat(T, source, other) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(T).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var item2 = null; | |
var item2$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
item2$enumerator = other.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 4; | |
$stateMachine.set_Current(item); | |
return true; | |
case 4: | |
$state = 1; | |
continue $top; | |
case 5: | |
while (item2$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item2 = item2$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 8; | |
$stateMachine.set_Current(item2); | |
return true; | |
case 8: | |
$state = 5; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Sum = function Enumerable_Sum(source) { | |
return System.Linq.Enumerable.Sum$1(source); | |
}; | |
$t.Sum$1 = function Enumerable_Sum(source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var num = 0; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var nullable = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (nullable != null) | |
num += (nullable || 0); | |
} | |
return num; | |
}; | |
$t.Sum$2 = function Enumerable_Sum(TSource, source, selector) { | |
return System.Linq.Enumerable.Sum(System.Linq.Enumerable.Select(TSource, System.Int32, source, | |
selector)); | |
}; | |
$t.Repeat = function Enumerable_Repeat(TResult, element, count) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var i = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (count < 0) { | |
$state = 2; | |
continue $top; | |
} | |
else { | |
$state = 3; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
return false; | |
case 2: | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
$state = 1; | |
continue $top; | |
case 3: | |
i = 0; | |
$state = 4; | |
continue $top; | |
case 4: | |
while (i < count) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 5: | |
$state = 1; | |
continue $top; | |
case 6: | |
$state = 8; | |
$stateMachine.set_Current(element); | |
return true; | |
case 7: | |
i++; | |
$state = 4; | |
continue $top; | |
case 8: | |
$state = 7; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Reverse = function Enumerable_Reverse(TSource, source) { | |
var stack = new (System.Collections.Generic.Stack$1(TSource).ctor)(); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
stack.Push(item); | |
} | |
return stack; | |
}; | |
$t.ToDictionary = function Enumerable_ToDictionary(TSource, TKey, source, keySelector) { | |
return System.Linq.Enumerable.ToDictionary$1(TSource, TKey, TSource, source, keySelector, $d.delegate(function(x) { | |
return x; | |
}, this)); | |
}; | |
$t.ToDictionary$1 = function Enumerable_ToDictionary(TSource, TKey, TValue, source, keySelector, valueSelector) { | |
var dictionary = new (System.Collections.Generic.Dictionary$2(TKey, TValue).ctor)(); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
var key = keySelector(item); | |
var value = valueSelector(item); | |
dictionary.set_Item(key, value); | |
} | |
return dictionary; | |
}; | |
$t.SequenceEqual = function Enumerable_SequenceEqual(TSource, source, other) { | |
return System.Linq.Enumerable.SequenceEqual$1(TSource, source, other, System.Collections.Generic.EqualityComparer$1(TSource).get_Default()); | |
}; | |
$t.SequenceEqual$1 = function Enumerable_SequenceEqual(TSource, source, other, comparer) { | |
var sourceEnumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
var otherEnumerator = other.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
while (sourceEnumerator.System$Collections$IEnumerator$MoveNext() && otherEnumerator.System$Collections$IEnumerator$MoveNext()) { | |
var sourceItem = sourceEnumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
var otherItem = otherEnumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
if (!comparer.System$Collections$Generic$IEqualityComparer$1$Equals(sourceItem, otherItem)) | |
return false; | |
} | |
return true; | |
}; | |
$t.Cast = function Enumerable_Cast(TResult, source) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
return false; | |
case 5: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
$state = 6; | |
$stateMachine.set_Current($d.cast(item, TResult)); | |
return true; | |
case 6: | |
$state = 3; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.OrderBy = function Enumerable_OrderBy(TSource, TKey, source, keySelector) { | |
return System.Linq.OrderedEnumerable$1(TSource).Create(TKey, source, keySelector, System.Collections.Generic.Comparer$1(TKey).get_Default(), | |
false); | |
}; | |
$t.OrderBy$1 = function Enumerable_OrderBy(TSource, TKey, source, keySelector, comparer) { | |
return System.Linq.OrderedEnumerable$1(TSource).Create(TKey, source, keySelector, comparer, false); | |
}; | |
$t.OrderByDescending = function Enumerable_OrderByDescending(TSource, TKey, source, keySelector) { | |
return System.Linq.OrderedEnumerable$1(TSource).Create(TKey, source, keySelector, System.Collections.Generic.Comparer$1(TKey).get_Default(), | |
true); | |
}; | |
$t.OrderByDescending$1 = function Enumerable_OrderByDescending(TSource, TKey, source, keySelector, comparer) { | |
return System.Linq.OrderedEnumerable$1(TSource).Create(TKey, source, keySelector, comparer, true); | |
}; | |
$t.ThenBy = function Enumerable_ThenBy(TSource, TKey, source, keySelector) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
else | |
return source.System$Linq$IOrderedEnumerable$1$CreateOrderedEnumerable(TKey, keySelector, | |
System.Collections.Generic.Comparer$1(TKey).get_Default(), false); | |
}; | |
$t.ThenBy$1 = function Enumerable_ThenBy(TSource, TKey, source, keySelector, comparer) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
else | |
return source.System$Linq$IOrderedEnumerable$1$CreateOrderedEnumerable(TKey, keySelector, | |
comparer, false); | |
}; | |
$t.ThenByDescending = function Enumerable_ThenByDescending(TSource, TKey, source, keySelector) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
else | |
return source.System$Linq$IOrderedEnumerable$1$CreateOrderedEnumerable(TKey, keySelector, | |
System.Collections.Generic.Comparer$1(TKey).get_Default(), true); | |
}; | |
$t.ThenByDescending$1 = function Enumerable_ThenByDescending(TSource, TKey, source, keySelector, comparer) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
else | |
return source.System$Linq$IOrderedEnumerable$1$CreateOrderedEnumerable(TKey, keySelector, | |
comparer, true); | |
}; | |
$t.OfType = function Enumerable_OfType(TResult, source) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if ($d.is(item, TResult)) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
$state = 1; | |
continue $top; | |
case 5: | |
$state = 6; | |
$stateMachine.set_Current($d.cast(item, TResult)); | |
return true; | |
case 6: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Empty = function Enumerable_Empty(TResult) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
$state = 1; | |
return false; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.DefaultIfEmpty = function Enumerable_DefaultIfEmpty(TSource, source) { | |
return System.Linq.Enumerable.DefaultIfEmpty$1(TSource, source, $d.default(TSource)); | |
}; | |
$t.DefaultIfEmpty$1 = function Enumerable_DefaultIfEmpty(TSource, source, defaultValue) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var isEmpty = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
isEmpty = true; | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
if (isEmpty) { | |
$state = 8; | |
continue $top; | |
} | |
$state = 7; | |
continue $top; | |
case 5: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
isEmpty = false; | |
$state = 6; | |
$stateMachine.set_Current(item); | |
return true; | |
case 6: | |
$state = 3; | |
continue $top; | |
case 7: | |
return false; | |
case 8: | |
$state = 9; | |
$stateMachine.set_Current(defaultValue); | |
return true; | |
case 9: | |
$state = 7; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.GroupBy = function Enumerable_GroupBy(TSource, TKey, source, keySelector) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TSource, System.Linq.IGrouping$2(TKey, | |
TSource), source, keySelector, System.IdentityFunction$1(TSource).Default, $d.delegate(System.Linq.Enumerable.GroupingCreator$2(TKey, | |
TSource).Create), System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.GroupBy$1 = function Enumerable_GroupBy(TSource, TKey, source, keySelector, comparer) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TSource, System.Linq.IGrouping$2(TKey, | |
TSource), source, keySelector, System.IdentityFunction$1(TSource).Default, $d.delegate(System.Linq.Enumerable.GroupingCreator$2(TKey, | |
TSource).Create), comparer); | |
}; | |
$t.GroupBy$3 = function Enumerable_GroupBy(TSource, TKey, TElement, source, keySelector, elementSelector) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TElement, System.Linq.IGrouping$2(TKey, | |
TElement), source, keySelector, elementSelector, $d.delegate(System.Linq.Enumerable.GroupingCreator$2(TKey, | |
TElement).Create), System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.GroupBy$5 = function Enumerable_GroupBy(TSource, TKey, TElement, source, keySelector, elementSelector, comparer) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TElement, System.Linq.IGrouping$2(TKey, | |
TElement), source, keySelector, elementSelector, $d.delegate(System.Linq.Enumerable.GroupingCreator$2(TKey, | |
TElement).Create), System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.GroupBy$2 = function Enumerable_GroupBy(TSource, TKey, TResult, source, keySelector, resultSelector) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TSource, TResult, source, keySelector, | |
System.IdentityFunction$1(TSource).Default, resultSelector, System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.GroupBy$6 = function Enumerable_GroupBy(TSource, TKey, TElement, TResult, source, keySelector, elementSelector, resultSelector) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TElement, TResult, source, keySelector, | |
elementSelector, resultSelector, System.Collections.Generic.EqualityComparer$1(TKey).get_Default()); | |
}; | |
$t.GroupBy$4 = function Enumerable_GroupBy(TSource, TKey, TResult, source, keySelector, resultSelector, comparer) { | |
return System.Linq.Enumerable.GroupBy$7(TSource, TKey, TSource, TResult, source, keySelector, | |
System.IdentityFunction$1(TSource).Default, resultSelector, comparer); | |
}; | |
$t.GroupBy$7 = function Enumerable_GroupBy(TSource, TKey, TElement, TResult, source, keySelector, elementSelector, resultSelector, comparer) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var dictionary = null; | |
var item = null; | |
var item$enumerator = null; | |
var key = null; | |
var list = null; | |
var item2 = null; | |
var item2$enumerator = null; | |
var result = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
dictionary = new (System.Collections.Generic.Dictionary$2(TKey, System.Collections.Generic.List$1(TElement)).ctor$2)(comparer); | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 1; | |
continue $top; | |
case 1: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
item2$enumerator = dictionary.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 6; | |
continue $top; | |
case 3: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
key = keySelector(item); | |
if (!(function() { | |
var $out = {}; | |
var $result$ = dictionary.TryGetValue(key, $out); | |
list = $out.value; | |
return $result$; | |
}).call(this)) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
list.Add(item); | |
$state = 1; | |
continue $top; | |
case 5: | |
list = new (System.Collections.Generic.List$1(TElement).ctor)(); | |
dictionary.set_Item(key, list); | |
$state = 4; | |
continue $top; | |
case 6: | |
while (item2$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 8; | |
continue $top; | |
} | |
$state = 7; | |
continue $top; | |
case 7: | |
return false; | |
case 8: | |
item2 = item2$enumerator.System$Collections$IEnumerator$get_Current(); | |
result = resultSelector(item2.get_Key(), item2.get_Value()); | |
$state = 9; | |
$stateMachine.set_Current(result); | |
return true; | |
case 9: | |
$state = 6; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.ToLookup = function Enumerable_ToLookup(TSource, TKey, source, keySelector) { | |
return new (System.Linq.Lookup$2(TKey, TSource).ctor)(System.Linq.Enumerable.GroupBy(TSource, | |
TKey, source, keySelector)); | |
}; | |
$t.ToLookup$1 = function Enumerable_ToLookup(TSource, TKey, source, keySelector, comparer) { | |
return new (System.Linq.Lookup$2(TKey, TSource).ctor)(System.Linq.Enumerable.GroupBy$4(TSource, | |
TKey, System.Linq.IGrouping$2(TKey, TSource), source, keySelector, $d.delegate(System.Linq.Enumerable.GroupingCreator$2(TKey, | |
TSource).Create), comparer)); | |
}; | |
$t.ToLookup$2 = function Enumerable_ToLookup(TSource, TKey, TElement, source, keySelector, elementSelector) { | |
return new (System.Linq.Lookup$2(TKey, TElement).ctor)(System.Linq.Enumerable.GroupBy$3(TSource, | |
TKey, TElement, source, keySelector, elementSelector)); | |
}; | |
$t.ToLookup$3 = function Enumerable_ToLookup(TSource, TKey, TElement, source, keySelector, elementSelector, comparer) { | |
return new (System.Linq.Lookup$2(TKey, TElement).ctor)(System.Linq.Enumerable.GroupBy$5(TSource, | |
TKey, TElement, source, keySelector, elementSelector, comparer)); | |
}; | |
$t.Distinct = function Enumerable_Distinct(TSource, source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
return System.Linq.Enumerable.Distinct$1(TSource, source, System.Collections.Generic.EqualityComparer$1(TSource).get_Default()); | |
}; | |
$t.Distinct$1 = function Enumerable_Distinct(TSource, source, comparer) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var set = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (source == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
set = new (System.Collections.Generic.HashSet$1(TSource).ctor$2)(comparer); | |
item$enumerator = source.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("source"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
return false; | |
case 5: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (set.Add(item)) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
$state = 3; | |
continue $top; | |
case 7: | |
$state = 8; | |
$stateMachine.set_Current(item); | |
return true; | |
case 8: | |
$state = 6; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.ElementAt = function Enumerable_ElementAt(TSource, source, index) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var list = $d.as(source, System.Collections.Generic.IList$1(TSource)); | |
if (list != null) | |
return list.System$Collections$Generic$IList$1$get_Item(index); | |
if (index < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$1("index"); | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
try { | |
while (enumerator.System$Collections$IEnumerator$MoveNext()) { | |
if (index == 0) | |
return enumerator.System$Collections$Generic$IEnumerator$1$get_Current(); | |
--index; | |
} | |
throw new System.ArgumentOutOfRangeException.ctor$1("index"); | |
} | |
finally { | |
enumerator.System$IDisposable$Dispose(); | |
} | |
}; | |
$t.ElementAtOrDefault = function Enumerable_ElementAtOrDefault(TSource, source, index) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (index >= 0) { | |
var list = $d.as(source, System.Collections.Generic.IList$1(TSource)); | |
if (list != null) { | |
if (index < list.System$Collections$Generic$ICollection$1$get_Count()) | |
return list.System$Collections$Generic$IList$1$get_Item(index); | |
} | |
else { | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var source1 = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (index == 0) | |
return source1; | |
--index; | |
} | |
} | |
} | |
return $d.default(TSource); | |
}; | |
$t.Range = function Enumerable_Range(start, count) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(System.Int32).ctor)(); | |
var num = null; | |
var value = null; | |
var index = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
num = start + count - 1; | |
if (count < 0 || num > 2147483647) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
value = start; | |
index = 0; | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentOutOfRangeException.ctor$1("count"); | |
$state = 1; | |
continue $top; | |
case 3: | |
while (index < count) { | |
$state = 5; | |
continue $top; | |
} | |
$state = 4; | |
continue $top; | |
case 4: | |
return false; | |
case 5: | |
$state = 7; | |
$stateMachine.set_Current(value); | |
return true; | |
case 6: | |
value++; | |
index++; | |
$state = 3; | |
continue $top; | |
case 7: | |
$state = 6; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Zip = function Enumerable_Zip(TFirst, TSecond, TResult, first, second, resultSelector) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TResult).ctor)(); | |
var firstEnumerator = null; | |
var secondEnumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (first == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (second == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("first"); | |
$state = 1; | |
continue $top; | |
case 3: | |
if (resultSelector == null) { | |
$state = 6; | |
continue $top; | |
} | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("second"); | |
$state = 3; | |
continue $top; | |
case 5: | |
firstEnumerator = first.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
secondEnumerator = second.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
$state = 7; | |
continue $top; | |
case 6: | |
throw new System.ArgumentNullException.ctor$1("resultSelector"); | |
$state = 5; | |
continue $top; | |
case 7: | |
while (firstEnumerator.System$Collections$IEnumerator$MoveNext() && secondEnumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
return false; | |
case 9: | |
$state = 10; | |
$stateMachine.set_Current(resultSelector(firstEnumerator.System$Collections$Generic$IEnumerator$1$get_Current(), | |
secondEnumerator.System$Collections$Generic$IEnumerator$1$get_Current())); | |
return true; | |
case 10: | |
$state = 7; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Union = function Enumerable_Union(TSource, first, second) { | |
if (first == null) | |
throw new System.ArgumentNullException.ctor$1("first"); | |
if (second == null) | |
throw new System.ArgumentNullException.ctor$1("second"); | |
return System.Linq.Enumerable.Union$1(TSource, first, second, System.Collections.Generic.EqualityComparer$1(TSource).get_Default()); | |
}; | |
$t.Union$1 = function Enumerable_Union(TSource, first, second, comparer) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var set = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (first == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (second == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("first"); | |
$state = 1; | |
continue $top; | |
case 3: | |
set = new (System.Collections.Generic.HashSet$1(TSource).ctor$2)(comparer); | |
item$enumerator = System.Linq.Enumerable.Concat(TSource, first, second).System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("second"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (set.Add(item)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 10: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Intersect = function Enumerable_Intersect(TSource, first, second) { | |
if (first == null) | |
throw new System.ArgumentNullException.ctor$1("first"); | |
if (second == null) | |
throw new System.ArgumentNullException.ctor$1("second"); | |
return System.Linq.Enumerable.Intersect$1(TSource, first, second, System.Collections.Generic.EqualityComparer$1(TSource).get_Default()); | |
}; | |
$t.Intersect$1 = function Enumerable_Intersect(TSource, first, second, comparer) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var firstSet = null; | |
var set = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (first == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (second == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("first"); | |
$state = 1; | |
continue $top; | |
case 3: | |
firstSet = new (System.Collections.Generic.HashSet$1(TSource).ctor$1)(first); | |
set = new (System.Collections.Generic.HashSet$1(TSource).ctor)(); | |
item$enumerator = second.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("second"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (set.Add(item) && firstSet.Contains(item)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 10: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$t.Average$6 = function Enumerable_Average(TSource, source, selector) { | |
return System.Linq.Enumerable.Average(System.Linq.Enumerable.Select(TSource, System.Double, source, | |
selector)); | |
}; | |
$t.Average$1 = function Enumerable_Average(source) { | |
return System.Linq.Enumerable.Average$8(source, $d.delegate(function() { | |
return null; | |
}, this)); | |
}; | |
$t.Average = function Enumerable_Average(source) { | |
return $d.nv(System.Linq.Enumerable.Average$8(System.Linq.Enumerable.Cast(System.Nullable$1(System.Double), | |
source), $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("No Elements to Average"); | |
}, this))); | |
}; | |
$t.Average$8 = function Enumerable_Average(source, onEmpty) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var num1 = 0; | |
var num2 = 0; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
num1 = $d.nadd(num1, item); | |
++num2; | |
} | |
if (num2 > 0) | |
return $d.nv(num1) / num2; | |
else | |
return onEmpty(); | |
}; | |
$t.Average$7 = function Enumerable_Average(TSource, source, selector) { | |
return System.Linq.Enumerable.Average$4(System.Linq.Enumerable.Select(TSource, System.Int64, | |
source, selector)); | |
}; | |
$t.Average$5 = function Enumerable_Average(source) { | |
return System.Linq.Enumerable.Average$8(System.Linq.Enumerable.Cast(System.Nullable$1(System.Double), | |
source), $d.delegate(function() { | |
return null; | |
}, this)); | |
}; | |
$t.Average$4 = function Enumerable_Average(source) { | |
return $d.nv(System.Linq.Enumerable.Average$8(System.Linq.Enumerable.Cast(System.Nullable$1(System.Double), | |
source), $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("No Elements to Average"); | |
}, this))); | |
}; | |
$t.Average$3 = function Enumerable_Average(source) { | |
return System.Linq.Enumerable.Average$8(System.Linq.Enumerable.Cast(System.Nullable$1(System.Double), | |
source), $d.delegate(function() { | |
return null; | |
}, this)); | |
}; | |
$t.Average$2 = function Enumerable_Average(source) { | |
return $d.nv(System.Linq.Enumerable.Average$8(System.Linq.Enumerable.Cast(System.Nullable$1(System.Double), | |
source), $d.delegate(function() { | |
throw new System.InvalidOperationException.ctor$1("No Elements to Average"); | |
}, this))); | |
}; | |
$t.Count = function Enumerable_Count(TSource, source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var collection1 = $d.as(source, System.Collections.Generic.ICollection$1(TSource)); | |
if (collection1 != null) | |
return collection1.System$Collections$Generic$ICollection$1$get_Count(); | |
var collection2 = $d.as(source, System.Collections.ICollection); | |
if (collection2 != null) | |
return collection2.System$Collections$ICollection$get_Count(); | |
var num = 0; | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
try { | |
while (enumerator.System$Collections$IEnumerator$MoveNext()) { | |
++num; | |
} | |
} | |
finally { | |
enumerator.System$IDisposable$Dispose(); | |
} | |
return num; | |
}; | |
$t.Count$1 = function Enumerable_Count(TSource, source, predicate) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (predicate == null) | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
var num = 0; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var source1 = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (predicate(source1)) | |
++num; | |
} | |
return num; | |
}; | |
$t.LongCount = function Enumerable_LongCount(TSource, source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var num = 0; | |
var enumerator = source.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
try { | |
while (enumerator.System$Collections$IEnumerator$MoveNext()) { | |
++num; | |
} | |
} | |
finally { | |
enumerator.System$IDisposable$Dispose(); | |
} | |
return num; | |
}; | |
$t.LongCount$1 = function Enumerable_LongCount(TSource, source, predicate) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
if (predicate == null) | |
throw new System.ArgumentNullException.ctor$1("predicate"); | |
var num = 0; | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var source1 = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (predicate(source1)) | |
++num; | |
} | |
return num; | |
}; | |
$t.Contains = function Enumerable_Contains(TSource, source, value) { | |
var collection = $d.as(source, System.Collections.Generic.ICollection$1(TSource)); | |
if (collection != null) | |
return collection.System$Collections$Generic$ICollection$1$Contains(value); | |
else | |
return System.Linq.Enumerable.Contains$1(TSource, source, value, null); | |
}; | |
$t.Contains$1 = function Enumerable_Contains(TSource, source, value, comparer) { | |
if (comparer == null) | |
comparer = System.Collections.Generic.EqualityComparer$1(TSource).get_Default(); | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
var $iter = source; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var x = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (comparer.System$Collections$Generic$IEqualityComparer$1$Equals(x, value)) | |
return true; | |
} | |
return false; | |
}; | |
$t.Except = function Enumerable_Except(TSource, first, second) { | |
if (first == null) | |
throw new System.ArgumentNullException.ctor$1("first"); | |
if (second == null) | |
throw new System.ArgumentNullException.ctor$1("second"); | |
return System.Linq.Enumerable.Except$1(TSource, first, second, System.Collections.Generic.EqualityComparer$1(TSource).get_Default()); | |
}; | |
$t.Except$1 = function Enumerable_Except(TSource, first, second, comparer) { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(TSource).ctor)(); | |
var set = null; | |
var item = null; | |
var item$enumerator = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
if (first == null) { | |
$state = 2; | |
continue $top; | |
} | |
$state = 1; | |
continue $top; | |
case 1: | |
if (second == null) { | |
$state = 4; | |
continue $top; | |
} | |
$state = 3; | |
continue $top; | |
case 2: | |
throw new System.ArgumentNullException.ctor$1("first"); | |
$state = 1; | |
continue $top; | |
case 3: | |
set = new (System.Collections.Generic.HashSet$1(TSource).ctor$3)(second, | |
comparer); | |
item$enumerator = first.System$Collections$IEnumerable$GetEnumerator(); | |
$state = 5; | |
continue $top; | |
case 4: | |
throw new System.ArgumentNullException.ctor$1("second"); | |
$state = 3; | |
continue $top; | |
case 5: | |
while (item$enumerator.System$Collections$IEnumerator$MoveNext()) { | |
$state = 7; | |
continue $top; | |
} | |
$state = 6; | |
continue $top; | |
case 6: | |
return false; | |
case 7: | |
item = item$enumerator.System$Collections$IEnumerator$get_Current(); | |
if (!set.Contains(item)) { | |
$state = 9; | |
continue $top; | |
} | |
$state = 8; | |
continue $top; | |
case 8: | |
$state = 5; | |
continue $top; | |
case 9: | |
$state = 10; | |
$stateMachine.set_Current(item); | |
return true; | |
case 10: | |
$state = 8; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
}); | |
System.Linq.Enumerable.GroupingCreator$2 = $d.declare("GroupingCreator`2", System.Object, 256, System.Linq.Enumerable, function($t, $p, TKey, TElement) { | |
$t.$typeInfo = function(t, p) { return [3, null, [["Create", t.Create, 22]]]; }; | |
$t.Create = function GroupingCreator$2_Create(key, elements) { | |
return new (System.Linq.Grouping$2(TKey, TElement).ctor)(key, elements); | |
}; | |
}, ["TKey", "TElement"]); | |
System.Linq.Expressions.Expression = $d.declare("System.Linq.Expressions.Expression", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, null, [["get_NodeType", p.get_NodeType, 6], ["Accept", null, 6], ["Lambda", t.Lambda$2, 22], ["Lambda", t.Lambda$3, 22], ["Lambda", t.Lambda, 22], ["Lambda", t.Lambda$1, 22], ["Property", t.Property$6, 22], ["Property", t.Property$4, 22], ["Property", t.Property$3, 22], ["Property", t.Property$2, 22], ["Property", t.Property$5, 22], ["Property", t.Property$1, 22], ["Property", t.Property, 22], ["PropertyOrField", t.PropertyOrField, 22], ["Parameter", t.Parameter, 22], ["Variable", t.Variable, 22], ["Variable", t.Variable$1, 22], ["Parameter", t.Parameter$1, 22], ["MakeMemberAccess", t.MakeMemberAccess, 22], ["Call", t.Call$1, 22], ["Call", t.Call, 22], ["Constant", t.Constant, 22], ["Constant", t.Constant$1, 22], ["MakeBinary", t.MakeBinary$1, 22], ["MakeBinary", t.MakeBinary, 22], ["MakeUnary", t.MakeUnary, 22], ["MakeUnary", t.MakeUnary$1, 22], ["New", t.New$1, 22], ["New", t.New, 22], ["New", t.New$3, 22], ["New", t.New$2, 22], ["Bind", t.Bind, 22], ["Bind", t.Bind$1, 22], ["MemberInit", t.MemberInit$1, 22], ["MemberInit", t.MemberInit, 22], ["ListInit", t.ListInit$3, 22], ["ListInit", t.ListInit$1, 22], ["ListInit", t.ListInit$5, 22], ["ListInit", t.ListInit$4, 22], ["ListInit", t.ListInit$2, 22], ["ListInit", t.ListInit, 22], ["ElementInit", t.ElementInit$1, 22], ["ElementInit", t.ElementInit, 22], ["NewArrayInit", t.NewArrayInit$1, 22], ["NewArrayInit", t.NewArrayInit, 22], ["NewArrayBounds", t.NewArrayBounds$1, 22], ["NewArrayBounds", t.NewArrayBounds, 22], ["TypeAs", t.TypeAs, 22], ["TypeIs", t.TypeIs, 22], ["Default", t.Default, 22], ["MakeIndex", t.MakeIndex, 22], ["ArrayIndex", t.ArrayIndex$2, 22], ["ArrayIndex", t.ArrayIndex, 22], ["ArrayIndex", t.ArrayIndex$1, 22], ["Condition", t.Condition, 22], ["Condition", t.Condition$1, 22], ["Invoke", t.Invoke$1, 22], ["Invoke", t.Invoke, 22], ["Field", t.Field, 22], ["Field", t.Field$1, 22], ["Field", t.Field$2, 22], ["Convert", t.Convert, 22], ["Convert", t.Convert$1, 22], ["Add", t.Add, 22], ["Add", t.Add$1, 22]], [["ctor", t.ctor, 4]], [["NodeType", System.Linq.Expressions.ExpressionType, 0], ["Type", 27]]]; }; | |
$t.$ator = function() { | |
this.NodeType = 0; | |
}; | |
$p.get_NodeType = function Expression_get_NodeType() { return this.NodeType; }; | |
$p.set_NodeType = function Expression_set_NodeType(value) { this.NodeType = value;return value; }; | |
$t.ctor = function Expression(nodeType) { | |
$t.$baseType.ctor.call(this); | |
this.set_NodeType(nodeType); | |
}; | |
$t.Lambda$2 = function Expression_Lambda(TDelegate, body, parameters) { | |
return $t.Lambda$3(TDelegate, body, null, false, parameters); | |
}; | |
$t.Lambda$3 = function Expression_Lambda(TDelegate, body, name, tailCall, parameters) { | |
return new (System.Linq.Expressions.Expression$1(TDelegate).ctor)(body, name, tailCall, parameters); | |
}; | |
$t.Lambda = function Expression_Lambda(delegateType, body, parameters) { | |
return $t.Lambda$1(delegateType, body, null, false, parameters); | |
}; | |
$t.Lambda$1 = function Expression_Lambda(delegateType, body, name, tailCall, parameters) { | |
return null; | |
}; | |
$t.Property$6 = function Expression_Property(instance, propertyName, args) { | |
return $t.Property$4(instance, null, args); | |
}; | |
$t.Property$4 = function Expression_Property(instance, indexer, args) { | |
return $t.Property$3(instance, indexer, $d.cast(args, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.Property$3 = function Expression_Property(instance, indexer, args) { | |
return new System.Linq.Expressions.IndexExpression.ctor(instance, indexer, null, System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, | |
args)); | |
}; | |
$t.Property$2 = function Expression_Property(expression, propertyName) { | |
var property = $d.getTypeFromInst(expression).GetProperty(propertyName); | |
return $t.Property$1(expression, property); | |
}; | |
$t.Property$5 = function Expression_Property(expression, type, propertyName) { | |
var property = type.GetProperty(propertyName); | |
return $t.Property$1(expression, property); | |
}; | |
$t.Property$1 = function Expression_Property(expression, property) { | |
return System.Linq.Expressions.MemberExpression.Make(expression, property); | |
}; | |
$t.Property = function Expression_Property(expression, propertyAccessor) { | |
return $t.Property$1(expression, $t.GetProperty(propertyAccessor)); | |
}; | |
$t.PropertyOrField = function Expression_PropertyOrField(expression, propertyOrFieldName) { | |
var property1 = expression.get_Type().GetProperty$1(propertyOrFieldName, 85); | |
if (property1 != null) | |
return $t.Property$1(expression, property1); | |
var field1 = expression.get_Type().GetField$1(propertyOrFieldName, 85); | |
if (field1 != null) | |
return $t.Field(expression, field1); | |
var property2 = expression.get_Type().GetProperty$1(propertyOrFieldName, 101); | |
if (property2 != null) | |
return $t.Property$1(expression, property2); | |
var field2 = expression.get_Type().GetField$1(propertyOrFieldName, 101); | |
if (field2 != null) | |
return $t.Field(expression, field2); | |
else | |
throw new System.Exception.ctor$1("Not found: " + propertyOrFieldName); | |
}; | |
$t.Parameter = function Expression_Parameter(type) { | |
return $t.Parameter$1(type, null); | |
}; | |
$t.Variable = function Expression_Variable(type) { | |
return $t.Variable$1(type, null); | |
}; | |
$t.Variable$1 = function Expression_Variable(type, name) { | |
return new System.Linq.Expressions.ParameterExpression.ctor(type, name); | |
}; | |
$t.Parameter$1 = function Expression_Parameter(type, name) { | |
return new System.Linq.Expressions.ParameterExpression.ctor(type, name); | |
}; | |
$t.MakeMemberAccess = function Expression_MakeMemberAccess(target, member) { | |
if ($d.is(member, System.Reflection.FieldInfo)) | |
return new System.Linq.Expressions.FieldExpression.ctor(target, $d.cast(member, System.Reflection.FieldInfo)); | |
else | |
if ($d.is(member, System.Reflection.PropertyInfo)) | |
return new System.Linq.Expressions.PropertyExpression.ctor(target, $d.cast(member, System.Reflection.PropertyInfo)); | |
else | |
throw new System.InvalidOperationException.ctor$1("Only field and property members are supported"); | |
}; | |
$t.Call$1 = function Expression_Call(target, method, args) { | |
return new System.Linq.Expressions.MethodCallExpression.ctor(target, method, args); | |
}; | |
$t.Call = function Expression_Call(method, args) { | |
return new System.Linq.Expressions.MethodCallExpression.ctor(null, method, args); | |
}; | |
$t.Constant = function Expression_Constant(value) { | |
return new System.Linq.Expressions.ConstantExpression.ctor(value); | |
}; | |
$t.Constant$1 = function Expression_Constant(value, type) { | |
return new System.Linq.Expressions.ConstantExpression.ctor$1(value, type); | |
}; | |
$t.MakeBinary$1 = function Expression_MakeBinary(nodeType, left, right, liftToNull, method) { | |
return new System.Linq.Expressions.BinaryExpression.ctor$1(left, right, nodeType, liftToNull, | |
method); | |
}; | |
$t.MakeBinary = function Expression_MakeBinary(binaryType, left, right) { | |
return new System.Linq.Expressions.BinaryExpression.ctor$1(left, right, binaryType, false, null); | |
}; | |
$t.MakeUnary = function Expression_MakeUnary(unaryType, operand, type) { | |
return new System.Linq.Expressions.UnaryExpression.ctor(unaryType, operand, null, type); | |
}; | |
$t.MakeUnary$1 = function Expression_MakeUnary(unaryType, operand, type, method) { | |
return new System.Linq.Expressions.UnaryExpression.ctor(unaryType, operand, method, type); | |
}; | |
$t.New$1 = function Expression_New(type) { | |
var constructor = System.Linq.Enumerable.Single$1(System.Reflection.ConstructorInfo, type.GetConstructors(), | |
$d.delegate(function(x) { | |
return x.parameters.length == 0; | |
}, this)); | |
return new System.Linq.Expressions.NewExpression.ctor(constructor, $d.array(System.Linq.Expressions.Expression, | |
0)); | |
}; | |
$t.New = function Expression_New(constructor) { | |
return new System.Linq.Expressions.NewExpression.ctor(constructor, $d.array(System.Linq.Expressions.Expression, | |
0)); | |
}; | |
$t.New$3 = function Expression_New(constructor, args) { | |
return new System.Linq.Expressions.NewExpression.ctor(constructor, args); | |
}; | |
$t.New$2 = function Expression_New(constructor, args) { | |
return new System.Linq.Expressions.NewExpression.ctor(constructor, args); | |
}; | |
$t.Bind = function Expression_Bind(member, expression) { | |
return new System.Linq.Expressions.MemberAssignment.ctor(member, expression); | |
}; | |
$t.Bind$1 = function Expression_Bind(propertyAccessor, expression) { | |
var memberInfo = $t.GetProperty(propertyAccessor); | |
return new System.Linq.Expressions.MemberAssignment.ctor(memberInfo, expression); | |
}; | |
$t.MemberInit$1 = function Expression_MemberInit(newExpression, bindings) { | |
return $t.MemberInit(newExpression, $d.cast(bindings, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.MemberBinding))); | |
}; | |
$t.MemberInit = function Expression_MemberInit(newExpression, bindings) { | |
return new System.Linq.Expressions.MemberInitExpression.ctor(newExpression, System.Linq.Enumerable.ToList(System.Linq.Expressions.MemberBinding, | |
bindings)); | |
}; | |
$t.GetProperty = function Expression_GetProperty(mi) { | |
var propertyName = mi.get_Name(); | |
if (propertyName.StartsWith("set_")) | |
propertyName = propertyName.Substring(4); | |
return mi.get_DeclaringType().GetProperty(propertyName); | |
}; | |
$t.ListInit$3 = function Expression_ListInit(newExpression, initializers) { | |
return $t.ListInit$1(newExpression, $d.cast(initializers, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.ListInit$1 = function Expression_ListInit(newExpression, initializers) { | |
var method = newExpression.get_Type().GetMethod("Add"); | |
return $t.ListInit$4(newExpression, method, initializers); | |
}; | |
$t.ListInit$5 = function Expression_ListInit(newExpression, addMethod, initializers) { | |
if (addMethod == null) | |
return $t.ListInit$1(newExpression, $d.cast(initializers, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
return $t.ListInit$4(newExpression, addMethod, $d.cast(initializers, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.ListInit$4 = function Expression_ListInit(newExpression, addMethod, initializers) { | |
if (addMethod == null) | |
return $t.ListInit$1(newExpression, initializers); | |
var list = System.Linq.Enumerable.ToArray(System.Linq.Expressions.ElementInit, System.Linq.Enumerable.Select(System.Linq.Expressions.Expression, | |
System.Linq.Expressions.ElementInit, initializers, $d.delegate(function(x) { | |
return $t.ElementInit(addMethod, (function() { | |
var $obj = new (System.Collections.Generic.List$1(System.Linq.Expressions.Expression).ctor)(); | |
$obj.Add(x); | |
return $obj; | |
}).call(this)); | |
}, this))); | |
return $t.ListInit$2(newExpression, list); | |
}; | |
$t.ListInit$2 = function Expression_ListInit(newExpression, initializers) { | |
return $t.ListInit(newExpression, $d.cast(initializers, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.ElementInit))); | |
}; | |
$t.ListInit = function Expression_ListInit(newExpression, initializers) { | |
return new System.Linq.Expressions.ListInitExpression.ctor(newExpression, System.Linq.Enumerable.ToList(System.Linq.Expressions.ElementInit, | |
initializers)); | |
}; | |
$t.ElementInit$1 = function Expression_ElementInit(addMethod, args) { | |
return $t.ElementInit(addMethod, $d.cast(args, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.ElementInit = function Expression_ElementInit(addMethod, args) { | |
return new System.Linq.Expressions.ElementInit.ctor(addMethod, System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, | |
args)); | |
}; | |
$t.NewArrayInit$1 = function Expression_NewArrayInit(type, initializers) { | |
return $t.NewArrayInit(type, $d.cast(initializers, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.NewArrayInit = function Expression_NewArrayInit(type, initializers) { | |
var expressions = System.Linq.Enumerable.ToArray(System.Linq.Expressions.Expression, initializers); | |
var i = 0; | |
var list = null; | |
if (list != null) | |
expressions = list; | |
return new System.Linq.Expressions.NewArrayExpression.ctor(32, type.MakeArrayType(), System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, | |
expressions)); | |
}; | |
$t.NewArrayBounds$1 = function Expression_NewArrayBounds(type, bounds) { | |
return $t.NewArrayBounds(type, $d.cast(bounds, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.NewArrayBounds = function Expression_NewArrayBounds(type, bounds) { | |
var expressions = System.Linq.Enumerable.ToArray(System.Linq.Expressions.Expression, bounds); | |
var count = expressions.length; | |
return new System.Linq.Expressions.NewArrayExpression.ctor(33, count != 1 ? type.MakeArrayType$1(count) : type.MakeArrayType(), | |
System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, expressions)); | |
}; | |
$t.TypeAs = function Expression_TypeAs(expression, type) { | |
return new System.Linq.Expressions.UnaryExpression.ctor(44, expression, null, type); | |
}; | |
$t.TypeIs = function Expression_TypeIs(expression, type) { | |
return new System.Linq.Expressions.TypeBinaryExpression.ctor(expression, type, 45); | |
}; | |
$t.Default = function Expression_Default(type) { | |
return new System.Linq.Expressions.DefaultExpression.ctor(type); | |
}; | |
$t.MakeIndex = function Expression_MakeIndex(target, indexer, args) { | |
return new System.Linq.Expressions.IndexExpression.ctor(target, indexer, indexer != null ? indexer.get_PropertyType() : null, | |
System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, args)); | |
}; | |
$t.ArrayIndex$2 = function Expression_ArrayIndex(array, indexes) { | |
return $t.ArrayIndex(array, $d.cast(indexes, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.ArrayIndex = function Expression_ArrayIndex(array, indexes) { | |
var method = $d.typeOf(Array).GetMethod("Get"); | |
return $t.Call$1(array, method, System.Linq.Enumerable.ToArray(System.Linq.Expressions.Expression, | |
indexes)); | |
}; | |
$t.ArrayIndex$1 = function Expression_ArrayIndex(array, index) { | |
return new System.Linq.Expressions.BinaryExpression.ctor(array, index, 5); | |
}; | |
$t.Condition = function Expression_Condition(test, ifTrue, ifFalse) { | |
return new System.Linq.Expressions.ConditionalExpression.ctor$1(test, ifTrue, ifFalse, ifTrue.get_Type()); | |
}; | |
$t.Condition$1 = function Expression_Condition(test, ifTrue, ifFalse, type) { | |
return new System.Linq.Expressions.ConditionalExpression.ctor$1(test, ifTrue, ifFalse, type); | |
}; | |
$t.Invoke$1 = function Expression_Invoke(expression, args) { | |
return $t.Invoke(expression, $d.cast(args, System.Collections.Generic.IEnumerable$1(System.Linq.Expressions.Expression))); | |
}; | |
$t.Invoke = function Expression_Invoke(expression, args) { | |
return new System.Linq.Expressions.InvocationExpression.ctor(expression, System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, | |
args), $d.typeOf(System.Object)); | |
}; | |
$t.Field = function Expression_Field(expression, field) { | |
return System.Linq.Expressions.MemberExpression.Make(expression, field); | |
}; | |
$t.Field$1 = function Expression_Field(expression, fieldName) { | |
var field = expression.get_Type().GetField$1(fieldName, 85); | |
if (field == null) | |
field = expression.get_Type().GetField$1(fieldName, 101); | |
if (field == null) | |
throw new System.InvalidOperationException.ctor$1(fieldName + ": " + $d.toString(expression.get_Type())); | |
else | |
return $t.Field(expression, field); | |
}; | |
$t.Field$2 = function Expression_Field(expression, type, fieldName) { | |
var field = type.GetField$1(fieldName, 93); | |
if (field == null) | |
field = type.GetField$1(fieldName, 109); | |
if (field == null) | |
throw new System.Exception.ctor$1(fieldName + ": " + $d.toString(type)); | |
else | |
return $t.Field(expression, field); | |
}; | |
$t.Convert = function Expression_Convert(expression, type) { | |
return $t.Convert$1(expression, type, null); | |
}; | |
$t.Convert$1 = function Expression_Convert(expression, type, method) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$t.Add = function Expression_Add(left, right) { | |
return $t.Add$1(left, right, null); | |
}; | |
$t.Add$1 = function Expression_Add(left, right, method) { | |
return $t.MakeBinary$1(0, left, right, false, method); | |
}; | |
}); | |
System.Linq.Expressions.BinaryExpression = $d.declare("System.Linq.Expressions.BinaryExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Left", p.get_Left, 6], ["get_Right", p.get_Right, 6], ["get_Method", p.get_Method, 6], ["get_Conversion", p.get_Conversion, 6], ["get_IsLifted", p.get_IsLifted, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6], ["get_IsReferenceComparison", p.get_IsReferenceComparison, 3], ["get_IsLiftedToNull", p.get_IsLiftedToNull, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]], [["Left", System.Linq.Expressions.Expression, 0], ["Right", System.Linq.Expressions.Expression, 1], ["Method", System.Reflection.MethodInfo, 2], ["Conversion", System.Linq.Expressions.LambdaExpression, 3], ["IsLifted", 39, 4], ["Type", 27, 6], ["IsReferenceComparison", 39, 8], ["IsLiftedToNull", 39, 9]]]; }; | |
$t.$ator = function() { | |
this.Left = null; | |
this.Right = null; | |
this.Method = null; | |
this.Conversion = null; | |
this.IsLifted = false; | |
}; | |
$p.get_Left = function BinaryExpression_get_Left() { return this.Left; }; | |
$p.set_Left = function BinaryExpression_set_Left(value) { this.Left = value;return value; }; | |
$p.get_Right = function BinaryExpression_get_Right() { return this.Right; }; | |
$p.set_Right = function BinaryExpression_set_Right(value) { this.Right = value;return value; }; | |
$p.get_Method = function BinaryExpression_get_Method() { return this.Method; }; | |
$p.set_Method = function BinaryExpression_set_Method(value) { this.Method = value;return value; }; | |
$p.get_Conversion = function BinaryExpression_get_Conversion() { return this.Conversion; }; | |
$p.set_Conversion = function BinaryExpression_set_Conversion(value) { this.Conversion = value;return value; }; | |
$p.get_IsLifted = function BinaryExpression_get_IsLifted() { return this.IsLifted; }; | |
$p.set_IsLifted = function BinaryExpression_set_IsLifted(value) { this.IsLifted = value;return value; }; | |
$t.ctor = function BinaryExpression(left, right, nodeType) { | |
$t.$baseType.ctor.call(this, nodeType); | |
this.set_Left(left); | |
this.set_Right(right); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function BinaryExpression(left, right, nodeType, liftToNull, method) { | |
$t.$baseType.ctor.call(this, nodeType); | |
this.set_Left(left); | |
this.set_Right(right); | |
this.set_Method(method); | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Accept = function BinaryExpression_Accept(visitor) { | |
return visitor.VisitBinary(this); | |
}; | |
$p.get_Type = function BinaryExpression_get_Type() { | |
switch (this.get_NodeType()) { | |
case 0: | |
case 63: | |
case 74: | |
case 1: | |
case 2: | |
case 3: | |
case 64: | |
case 46: | |
case 12: | |
case 65: | |
case 14: | |
case 66: | |
case 19: | |
case 67: | |
case 25: | |
case 68: | |
case 26: | |
case 69: | |
case 75: | |
case 27: | |
case 36: | |
case 70: | |
case 37: | |
case 41: | |
case 72: | |
case 42: | |
case 73: | |
case 76: | |
case 43: | |
return this.get_Left().get_Type(); | |
case 13: | |
case 15: | |
case 16: | |
case 20: | |
case 21: | |
case 35: | |
case 45: | |
return $d.typeOf(Boolean); | |
case 5: | |
return $d.typeOf(System.Object); | |
default: | |
throw new System.Exception.ctor$1("Unexpected node type: " + $d.toString($d.boxEnum(System.Linq.Expressions.ExpressionType, | |
this.get_NodeType()))); | |
} | |
}; | |
$p.Update = function BinaryExpression_Update(left, conversion, right) { | |
return this; | |
}; | |
$p.get_IsReferenceComparison = function BinaryExpression_get_IsReferenceComparison() { | |
var type1 = this.get_Left().get_Type(); | |
var type2 = this.get_Right().get_Type(); | |
var method = this.get_Method(); | |
switch (this.get_NodeType()) { | |
case 13: | |
case 35: | |
if (method == null && !type1.get_IsValueType()) | |
return !type2.get_IsValueType(); | |
else | |
break; | |
} | |
return false; | |
}; | |
$p.get_IsLiftedToNull = function BinaryExpression_get_IsLiftedToNull() { | |
if (this.get_IsLifted()) | |
return this.get_Type() == $d.typeOf(System.Nullable$1); | |
else | |
return false; | |
}; | |
}); | |
System.Linq.Expressions.ConditionalExpression = $d.declare("System.Linq.Expressions.ConditionalExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Test", p.get_Test, 6], ["get_IfTrue", p.get_IfTrue, 6], ["get_IfFalse", p.get_IfFalse, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]], [["Test", System.Linq.Expressions.Expression, 0], ["IfTrue", System.Linq.Expressions.Expression, 1], ["IfFalse", System.Linq.Expressions.Expression, 2], ["Type", 27, 4]]]; }; | |
$t.$ator = function() { | |
this.type = null; | |
this.Test = null; | |
this.IfTrue = null; | |
this.IfFalse = null; | |
}; | |
$p.get_Test = function ConditionalExpression_get_Test() { return this.Test; }; | |
$p.set_Test = function ConditionalExpression_set_Test(value) { this.Test = value;return value; }; | |
$p.get_IfTrue = function ConditionalExpression_get_IfTrue() { return this.IfTrue; }; | |
$p.set_IfTrue = function ConditionalExpression_set_IfTrue(value) { this.IfTrue = value;return value; }; | |
$p.get_IfFalse = function ConditionalExpression_get_IfFalse() { return this.IfFalse; }; | |
$p.set_IfFalse = function ConditionalExpression_set_IfFalse(value) { this.IfFalse = value;return value; }; | |
$t.ctor = function ConditionalExpression(test, ifTrue, ifFalse) { | |
$t.$baseType.ctor.call(this, 8); | |
this.set_Test(test); | |
this.set_IfTrue(ifTrue); | |
this.set_IfFalse(ifFalse); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ConditionalExpression(test, ifTrue, ifFalse, type) { | |
$t.$baseType.ctor.call(this, 8); | |
this.set_Test(test); | |
this.set_IfTrue(ifTrue); | |
this.set_IfFalse(ifFalse); | |
this.type = type; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Accept = function ConditionalExpression_Accept(visitor) { | |
return visitor.VisitConditional(this); | |
}; | |
$p.get_Type = function ConditionalExpression_get_Type() { | |
return this.type || this.get_IfTrue().get_Type(); | |
}; | |
$p.Update = function ConditionalExpression_Update(test, ifTrue, ifFalse) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.ConstantExpression = $d.declare("System.Linq.Expressions.ConstantExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Value", p.get_Value, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]], [["Value", 1, 0], ["Type", 27, 2]]]; }; | |
$t.$ator = function() { | |
this.type = null; | |
this.Value = null; | |
}; | |
$p.get_Value = function ConstantExpression_get_Value() { return this.Value; }; | |
$p.set_Value = function ConstantExpression_set_Value(value) { this.Value = value;return value; }; | |
$t.ctor = function ConstantExpression(value) { | |
$t.$baseType.ctor.call(this, 9); | |
this.set_Value(value); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ConstantExpression(value, type) { | |
$t.ctor.call(this, value); | |
this.type = type; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Accept = function ConstantExpression_Accept(visitor) { | |
return visitor.VisitConstant(this); | |
}; | |
$p.get_Type = function ConstantExpression_get_Type() { | |
return this.type || (this.get_Value() != null ? $d.getTypeFromInst(this.get_Value()) : $d.typeOf(System.Object)); | |
}; | |
}); | |
System.Linq.Expressions.DefaultExpression = $d.declare("System.Linq.Expressions.DefaultExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["Type", 27, 1]]]; }; | |
$t.$ator = function() { | |
this.type = null; | |
}; | |
$t.ctor = function DefaultExpression(type) { | |
$t.$baseType.ctor.call(this, 51); | |
this.type = type; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function DefaultExpression_Accept(visitor) { | |
return visitor.VisitDefault(this); | |
}; | |
$p.get_Type = function DefaultExpression_get_Type() { | |
return this.type; | |
}; | |
}); | |
System.Linq.Expressions.IArgumentProvider = $d.declare("System.Linq.Expressions.IArgumentProvider", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [160, null, null, null, [["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression)]]]; }; | |
}); | |
System.Linq.Expressions.ElementInit = $d.declare("System.Linq.Expressions.ElementInit", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Linq.Expressions.IArgumentProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_AddMethod", p.get_AddMethod, 6], ["get_Arguments", p.get_Arguments, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["AddMethod", System.Reflection.MethodInfo, 0], ["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 1]]]; }; | |
$t.$ator = function() { | |
this.AddMethod = null; | |
this.Arguments = null; | |
}; | |
$p.get_AddMethod = function ElementInit_get_AddMethod() { return this.AddMethod; }; | |
$p.set_AddMethod = function ElementInit_set_AddMethod(value) { this.AddMethod = value;return value; }; | |
$p.get_Arguments = function ElementInit_get_Arguments() { return this.Arguments; }; | |
$p.set_Arguments = function ElementInit_set_Arguments(value) { this.Arguments = value;return value; }; | |
$t.ctor = function ElementInit(addMethod, args) { | |
$t.$baseType.ctor.call(this); | |
this.set_AddMethod(addMethod); | |
this.set_Arguments(args); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Update = function ElementInit_Update(args) { | |
return this; | |
}; | |
$p.System$Linq$Expressions$IArgumentProvider$get_Arguments = $p.get_Arguments; | |
}); | |
System.Linq.Expressions.LambdaExpression = $d.declare("System.Linq.Expressions.LambdaExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, null, [["get_Type", p.get_Type, 6], ["get_Name", p.get_Name, 6], ["get_Body", p.get_Body, 6], ["get_Parameters", p.get_Parameters, 6], ["get_DelegateType", p.get_DelegateType, 6], ["get_TailCall", p.get_TailCall, 6], ["Update", p.Update, 6], ["Compile", p.Compile, 6]], [["ctor", t.ctor, 3]], [["Type", 27, 0], ["Name", 20, 1], ["Body", System.Linq.Expressions.Expression, 2], ["Parameters", System.Collections.Generic.List$1(System.Linq.Expressions.ParameterExpression), 3], ["DelegateType", 27, 4], ["TailCall", 39, 5]]]; }; | |
$t.$ator = function() { | |
this.name = null; | |
this.body = null; | |
this.parameters = null; | |
this.delegateType = null; | |
this.tailCall = false; | |
}; | |
$t.ctor = function LambdaExpression(delegateType, name, body, tailCall, parameters) { | |
$t.$baseType.ctor.call(this, 18); | |
this.name = name; | |
this.body = body; | |
this.parameters = System.Linq.Enumerable.ToList(System.Linq.Expressions.ParameterExpression, | |
parameters); | |
this.delegateType = delegateType; | |
this.tailCall = tailCall; | |
}; | |
$p.get_Type = function LambdaExpression_get_Type() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_Name = function LambdaExpression_get_Name() { | |
return this.name; | |
}; | |
$p.get_Body = function LambdaExpression_get_Body() { | |
return this.body; | |
}; | |
$p.get_Parameters = function LambdaExpression_get_Parameters() { | |
return this.parameters; | |
}; | |
$p.get_DelegateType = function LambdaExpression_get_DelegateType() { | |
return this.delegateType; | |
}; | |
$p.get_TailCall = function LambdaExpression_get_TailCall() { | |
return this.tailCall; | |
}; | |
$p.Update = function LambdaExpression_Update(body, parameters) { | |
return this; | |
}; | |
$p.Compile = function LambdaExpression_Compile() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
}); | |
System.Linq.Expressions.Expression$1 = $d.declare("System.Linq.Expressions.Expression`1", System.Linq.Expressions.LambdaExpression, 256, $asm, function($t, $p, TDelegate) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Accept", p.Accept, 6], ["Compile", p.Compile$1, 6]], [["ctor", t.ctor, 3]]]; }; | |
$t.ctor = function Expression$1(body, name, tailCall, parameters) { | |
$t.$baseType.ctor.call(this, $d.typeOf(TDelegate), name, body, tailCall, parameters); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function Expression$1_Accept(visitor) { | |
return visitor.VisitLambda(TDelegate, this); | |
}; | |
$p.Compile$1 = function Expression$1_Compile() { | |
var lambdaExpression = this; | |
var lambda = function() { | |
var evaluator = new DuoCode.Runtime.Evaluator.ctor(lambdaExpression.get_Body()); | |
var index = 0; | |
for (var $i1 = 0, $a1 = lambdaExpression.get_Parameters(), $length1 = $a1.storage.length; $i1 != $length1; $i1++) { | |
var parameter = $a1.storage[$i1]; | |
var value = arguments[index]; | |
evaluator.AddArgument(parameter, value); | |
index++; | |
} | |
return evaluator.Evaluate(); | |
}; | |
return $d.delegate(lambda, $d.typeOf(TDelegate).self); | |
}; | |
}, ["TDelegate"]); | |
System.Linq.Expressions.ExpressionType = $d.declareEnum("System.Linq.Expressions.ExpressionType", 45, $asm, 257, ["Add", "AddChecked", "And", "AndAlso", "ArrayLength", "ArrayIndex", "Call", "Coalesce", "Conditional", "Constant", "Convert", "ConvertChecked", "Divide", "Equal", "ExclusiveOr", "GreaterThan", "GreaterThanOrEqual", "Invoke", "Lambda", "LeftShift", "LessThan", "LessThanOrEqual", "ListInit", "MemberAccess", "MemberInit", "Modulo", "Multiply", "MultiplyChecked", "Negate", "UnaryPlus", "NegateChecked", "New", "NewArrayInit", "NewArrayBounds", "Not", "NotEqual", "Or", "OrElse", "Parameter", "Power", "Quote", "RightShift", "Subtract", "SubtractChecked", "TypeAs", "TypeIs", "Assign", "Block", "DebugInfo", "Decrement", "Dynamic", "Default", "Extension", "Goto", "Increment", "Index", "Label", "RuntimeVariables", "Loop", "Switch", "Throw", "Try", "Unbox", "AddAssign", "AndAssign", "DivideAssign", "ExclusiveOrAssign", "LeftShiftAssign", "ModuloAssign", "MultiplyAssign", "OrAssign", "PowerAssign", "RightShiftAssign", "SubtractAssign", "AddAssignChecked", "MultiplyAssignChecked", "SubtractAssignChecked", "PreIncrementAssign", "PreDecrementAssign", "PostIncrementAssign", "PostDecrementAssign", "TypeEqual", "OnesComplement", "IsTrue", "IsFalse"], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84]); | |
System.Linq.Expressions.MemberExpression = $d.declare("System.Linq.Expressions.MemberExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [129, null, [["get_Expression", p.get_Expression, 6], ["get_Member", p.get_Member, 6], ["Accept", p.Accept, 6], ["Make", t.Make, 19], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Expression", System.Linq.Expressions.Expression, 0], ["Member", System.Reflection.MemberInfo, 1]]]; }; | |
$t.$ator = function() { | |
this.Expression = null; | |
this.Member = null; | |
}; | |
$p.get_Expression = function MemberExpression_get_Expression() { return this.Expression; }; | |
$p.set_Expression = function MemberExpression_set_Expression(value) { this.Expression = value;return value; }; | |
$p.get_Member = function MemberExpression_get_Member() { return this.Member; }; | |
$p.set_Member = function MemberExpression_set_Member(value) { this.Member = value;return value; }; | |
$t.ctor = function MemberExpression(expression, member) { | |
$t.$baseType.ctor.call(this, 23); | |
this.set_Expression(expression); | |
this.set_Member(member); | |
}; | |
$p.Accept = function MemberExpression_Accept(visitor) { | |
return visitor.VisitMember(this); | |
}; | |
$t.Make = function MemberExpression_Make(expression, member) { | |
if (member.get_MemberType() == 4) { | |
return new System.Linq.Expressions.FieldExpression.ctor(expression, $d.cast(member, System.Reflection.FieldInfo)); | |
} | |
else { | |
return new System.Linq.Expressions.PropertyExpression.ctor(expression, $d.cast(member, System.Reflection.PropertyInfo)); | |
} | |
}; | |
$p.Update = function MemberExpression_Update(Expression) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.FieldExpression = $d.declare("System.Linq.Expressions.FieldExpression", System.Linq.Expressions.MemberExpression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["Type", 27, 0]]]; }; | |
$t.ctor = function FieldExpression(expression, member) { | |
$t.$baseType.ctor.call(this, expression, member); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Type = function FieldExpression_get_Type() { | |
return ($d.cast(this.get_Member(), System.Reflection.FieldInfo)).get_FieldType(); | |
}; | |
}); | |
System.Linq.Expressions.IndexExpression = $d.declare("System.Linq.Expressions.IndexExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Linq.Expressions.IArgumentProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Object", p.get_Object, 6], ["get_Indexer", p.get_Indexer, 6], ["get_Arguments", p.get_Arguments, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["Object", System.Linq.Expressions.Expression, 0], ["Indexer", System.Reflection.PropertyInfo, 1], ["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 2], ["Type", 27, 4]]]; }; | |
$t.$ator = function() { | |
this.elementType = null; | |
this.Object = null; | |
this.Indexer = null; | |
this.Arguments = null; | |
}; | |
$p.get_Object = function IndexExpression_get_Object() { return this.Object; }; | |
$p.set_Object = function IndexExpression_set_Object(value) { this.Object = value;return value; }; | |
$p.get_Indexer = function IndexExpression_get_Indexer() { return this.Indexer; }; | |
$p.set_Indexer = function IndexExpression_set_Indexer(value) { this.Indexer = value;return value; }; | |
$p.get_Arguments = function IndexExpression_get_Arguments() { return this.Arguments; }; | |
$p.set_Arguments = function IndexExpression_set_Arguments(value) { this.Arguments = value;return value; }; | |
$t.ctor = function IndexExpression(obj, indexer, elementType, args) { | |
$t.$baseType.ctor.call(this, 55); | |
this.set_Object(obj); | |
this.set_Indexer(indexer); | |
this.set_Arguments(args); | |
this.elementType = elementType; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function IndexExpression_Accept(visitor) { | |
return visitor.VisitIndex(this); | |
}; | |
$p.get_Type = function IndexExpression_get_Type() { | |
return this.elementType; | |
}; | |
$p.System$Linq$Expressions$IArgumentProvider$get_Arguments = $p.get_Arguments; | |
}); | |
System.Linq.Expressions.InvocationExpression = $d.declare("System.Linq.Expressions.InvocationExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Linq.Expressions.IArgumentProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Expression", p.get_Expression, 6], ["get_Arguments", p.get_Arguments, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Rewrite", p.Rewrite, 3]], [["ctor", t.ctor, 6]], [["Expression", System.Linq.Expressions.Expression, 0], ["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.returnType = null; | |
this.Expression = null; | |
this.Arguments = null; | |
}; | |
$p.get_Expression = function InvocationExpression_get_Expression() { return this.Expression; }; | |
$p.set_Expression = function InvocationExpression_set_Expression(value) { this.Expression = value;return value; }; | |
$p.get_Arguments = function InvocationExpression_get_Arguments() { return this.Arguments; }; | |
$p.set_Arguments = function InvocationExpression_set_Arguments(value) { this.Arguments = value;return value; }; | |
$t.ctor = function InvocationExpression(expression, args, returnType) { | |
$t.$baseType.ctor.call(this, 17); | |
this.set_Expression(expression); | |
this.set_Arguments(args); | |
this.returnType = returnType; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function InvocationExpression_Accept(visitor) { | |
return visitor.VisitInvocation(this); | |
}; | |
$p.get_Type = function InvocationExpression_get_Type() { | |
return this.returnType; | |
}; | |
$p.Rewrite = function InvocationExpression_Rewrite(lambda, args) { | |
return this; | |
}; | |
$p.System$Linq$Expressions$IArgumentProvider$get_Arguments = $p.get_Arguments; | |
}); | |
System.Linq.Expressions.ListInitExpression = $d.declare("System.Linq.Expressions.ListInitExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_NewExpression", p.get_NewExpression, 6], ["get_Initializers", p.get_Initializers, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["NewExpression", System.Linq.Expressions.NewExpression, 0], ["Initializers", System.Collections.Generic.List$1(System.Linq.Expressions.ElementInit), 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.NewExpression = null; | |
this.Initializers = null; | |
}; | |
$p.get_NewExpression = function ListInitExpression_get_NewExpression() { return this.NewExpression; }; | |
$p.set_NewExpression = function ListInitExpression_set_NewExpression(value) { this.NewExpression = value;return value; }; | |
$p.get_Initializers = function ListInitExpression_get_Initializers() { return this.Initializers; }; | |
$p.set_Initializers = function ListInitExpression_set_Initializers(value) { this.Initializers = value;return value; }; | |
$t.ctor = function ListInitExpression(newExpression, initializers) { | |
$t.$baseType.ctor.call(this, 22); | |
this.set_NewExpression(newExpression); | |
this.set_Initializers(initializers); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function ListInitExpression_Accept(visitor) { | |
return visitor.VisitListInit(this); | |
}; | |
$p.get_Type = function ListInitExpression_get_Type() { | |
return this.get_NewExpression().get_Type(); | |
}; | |
$p.Update = function ListInitExpression_Update(NewExpression, initializers) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.MemberBinding = $d.declare("System.Linq.Expressions.MemberBinding", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_BindingType", p.get_BindingType, 6], ["get_Member", p.get_Member, 6]], [["ctor", t.ctor, 6]], [["BindingType", System.Linq.Expressions.MemberBindingType, 0], ["Member", System.Reflection.MemberInfo, 1]]]; }; | |
$t.$ator = function() { | |
this.BindingType = 0; | |
this.Member = null; | |
}; | |
$p.get_BindingType = function MemberBinding_get_BindingType() { return this.BindingType; }; | |
$p.set_BindingType = function MemberBinding_set_BindingType(value) { this.BindingType = value;return value; }; | |
$p.get_Member = function MemberBinding_get_Member() { return this.Member; }; | |
$p.set_Member = function MemberBinding_set_Member(value) { this.Member = value;return value; }; | |
$t.ctor = function MemberBinding(bindingType, member) { | |
$t.$baseType.ctor.call(this); | |
this.set_BindingType(bindingType); | |
this.set_Member(member); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Linq.Expressions.MemberAssignment = $d.declare("System.Linq.Expressions.MemberAssignment", System.Linq.Expressions.MemberBinding, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Expression", p.get_Expression, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Expression", System.Linq.Expressions.Expression, 0]]]; }; | |
$t.$ator = function() { | |
this.Expression = null; | |
}; | |
$p.get_Expression = function MemberAssignment_get_Expression() { return this.Expression; }; | |
$p.set_Expression = function MemberAssignment_set_Expression(value) { this.Expression = value;return value; }; | |
$t.ctor = function MemberAssignment(member, expression) { | |
$t.$baseType.ctor.call(this, 0, member); | |
this.set_Expression(expression); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Update = function MemberAssignment_Update(Expression) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.MemberBindingType = $d.declareEnum("System.Linq.Expressions.MemberBindingType", 45, $asm, 257, ["Assignment", "MemberBinding", "ListBinding"], [0, 1, 2]); | |
System.Linq.Expressions.MemberInitExpression = $d.declare("System.Linq.Expressions.MemberInitExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_NewExpression", p.get_NewExpression, 6], ["get_Bindings", p.get_Bindings, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["NewExpression", System.Linq.Expressions.NewExpression, 0], ["Bindings", System.Collections.Generic.List$1(System.Linq.Expressions.MemberBinding), 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.NewExpression = null; | |
this.Bindings = null; | |
}; | |
$p.get_NewExpression = function MemberInitExpression_get_NewExpression() { return this.NewExpression; }; | |
$p.set_NewExpression = function MemberInitExpression_set_NewExpression(value) { this.NewExpression = value;return value; }; | |
$p.get_Bindings = function MemberInitExpression_get_Bindings() { return this.Bindings; }; | |
$p.set_Bindings = function MemberInitExpression_set_Bindings(value) { this.Bindings = value;return value; }; | |
$t.ctor = function MemberInitExpression(newExpression, bindings) { | |
$t.$baseType.ctor.call(this, 24); | |
this.set_NewExpression(newExpression); | |
this.set_Bindings(bindings); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function MemberInitExpression_Accept(visitor) { | |
return visitor.VisitMemberInit(this); | |
}; | |
$p.get_Type = function MemberInitExpression_get_Type() { | |
return this.get_NewExpression().get_Type(); | |
}; | |
$p.Update = function MemberInitExpression_Update(newExpression, bindings) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.MemberListBinding = $d.declare("System.Linq.Expressions.MemberListBinding", System.Linq.Expressions.MemberBinding, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Initializers", p.get_Initializers, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Initializers", System.Collections.Generic.List$1(System.Linq.Expressions.ElementInit), 0]]]; }; | |
$t.$ator = function() { | |
this.Initializers = null; | |
}; | |
$p.get_Initializers = function MemberListBinding_get_Initializers() { return this.Initializers; }; | |
$p.set_Initializers = function MemberListBinding_set_Initializers(value) { this.Initializers = value;return value; }; | |
$t.ctor = function MemberListBinding(bindingType, member, initializers) { | |
$t.$baseType.ctor.call(this, bindingType, member); | |
this.set_Initializers(initializers); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Update = function MemberListBinding_Update(initializers) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.MemberMemberBinding = $d.declare("System.Linq.Expressions.MemberMemberBinding", System.Linq.Expressions.MemberBinding, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Bindings", p.get_Bindings, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Bindings", System.Collections.Generic.List$1(System.Linq.Expressions.MemberBinding), 0]]]; }; | |
$t.$ator = function() { | |
this.Bindings = null; | |
}; | |
$p.get_Bindings = function MemberMemberBinding_get_Bindings() { return this.Bindings; }; | |
$p.set_Bindings = function MemberMemberBinding_set_Bindings(value) { this.Bindings = value;return value; }; | |
$t.ctor = function MemberMemberBinding(bindingType, member, bindings) { | |
$t.$baseType.ctor.call(this, bindingType, member); | |
this.set_Bindings(bindings); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Update = function MemberMemberBinding_Update(bindings) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.MethodCallExpression = $d.declare("System.Linq.Expressions.MethodCallExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Linq.Expressions.IArgumentProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Object", p.get_Object, 6], ["get_Method", p.get_Method, 6], ["get_Arguments", p.get_Arguments, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["Object", System.Linq.Expressions.Expression, 0], ["Method", System.Reflection.MethodInfo, 1], ["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 2], ["Type", 27, 4]]]; }; | |
$t.$ator = function() { | |
this.Object = null; | |
this.Method = null; | |
this.Arguments = null; | |
}; | |
$p.get_Object = function MethodCallExpression_get_Object() { return this.Object; }; | |
$p.set_Object = function MethodCallExpression_set_Object(value) { this.Object = value;return value; }; | |
$p.get_Method = function MethodCallExpression_get_Method() { return this.Method; }; | |
$p.set_Method = function MethodCallExpression_set_Method(value) { this.Method = value;return value; }; | |
$p.get_Arguments = function MethodCallExpression_get_Arguments() { return this.Arguments; }; | |
$p.set_Arguments = function MethodCallExpression_set_Arguments(value) { this.Arguments = value;return value; }; | |
$t.ctor = function MethodCallExpression(obj, method, args) { | |
$t.$baseType.ctor.call(this, 6); | |
this.set_Object(obj); | |
this.set_Method(method); | |
this.set_Arguments(System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, args)); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function MethodCallExpression_Accept(visitor) { | |
return visitor.VisitMethodCall(this); | |
}; | |
$p.get_Type = function MethodCallExpression_get_Type() { | |
return this.get_Method().get_ReturnType(); | |
}; | |
$p.System$Linq$Expressions$IArgumentProvider$get_Arguments = $p.get_Arguments; | |
}); | |
System.Linq.Expressions.NewArrayExpression = $d.declare("System.Linq.Expressions.NewArrayExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Expressions", p.get_Expressions, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Expressions", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 0], ["Type", 27, 2]]]; }; | |
$t.$ator = function() { | |
this.type = null; | |
this.Expressions = null; | |
}; | |
$p.get_Expressions = function NewArrayExpression_get_Expressions() { return this.Expressions; }; | |
$p.set_Expressions = function NewArrayExpression_set_Expressions(value) { this.Expressions = value;return value; }; | |
$t.ctor = function NewArrayExpression(nodeType, type, expressions) { | |
$t.$baseType.ctor.call(this, nodeType); | |
this.type = type; | |
this.set_Expressions(expressions); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function NewArrayExpression_Accept(visitor) { | |
return visitor.VisitNewArray(this); | |
}; | |
$p.get_Type = function NewArrayExpression_get_Type() { | |
return this.type; | |
}; | |
$p.Update = function NewArrayExpression_Update(expressions) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.NewExpression = $d.declare("System.Linq.Expressions.NewExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Linq.Expressions.IArgumentProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Arguments", p.get_Arguments, 6], ["get_Constructor", p.get_Constructor, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Arguments", System.Collections.Generic.List$1(System.Linq.Expressions.Expression), 0], ["Constructor", System.Reflection.ConstructorInfo, 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.Arguments = null; | |
this.Constructor = null; | |
}; | |
$p.get_Arguments = function NewExpression_get_Arguments() { return this.Arguments; }; | |
$p.set_Arguments = function NewExpression_set_Arguments(value) { this.Arguments = value;return value; }; | |
$p.get_Constructor = function NewExpression_get_Constructor() { return this.Constructor; }; | |
$p.set_Constructor = function NewExpression_set_Constructor(value) { this.Constructor = value;return value; }; | |
$t.ctor = function NewExpression(constructor, args) { | |
$t.$baseType.ctor.call(this, 31); | |
this.set_Constructor(constructor); | |
this.set_Arguments(System.Linq.Enumerable.ToList(System.Linq.Expressions.Expression, args)); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function NewExpression_Accept(visitor) { | |
return visitor.VisitNew(this); | |
}; | |
$p.get_Type = function NewExpression_get_Type() { | |
return this.get_Constructor().get_DeclaringType(); | |
}; | |
$p.Update = function NewExpression_Update(args) { | |
return this; | |
}; | |
$p.System$Linq$Expressions$IArgumentProvider$get_Arguments = $p.get_Arguments; | |
}); | |
System.Linq.Expressions.ParameterExpression = $d.declare("System.Linq.Expressions.ParameterExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_ParameterType", p.get_ParameterType, 6], ["get_Name", p.get_Name, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["ParameterType", 27, 0], ["Name", 20, 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.ParameterType = null; | |
this.Name = null; | |
}; | |
$p.get_ParameterType = function ParameterExpression_get_ParameterType() { return this.ParameterType; }; | |
$p.set_ParameterType = function ParameterExpression_set_ParameterType(value) { this.ParameterType = value;return value; }; | |
$p.get_Name = function ParameterExpression_get_Name() { return this.Name; }; | |
$p.set_Name = function ParameterExpression_set_Name(value) { this.Name = value;return value; }; | |
$t.ctor = function ParameterExpression(parameterType, name) { | |
$t.$baseType.ctor.call(this, 38); | |
this.set_ParameterType(parameterType); | |
this.set_Name(name); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function ParameterExpression_Accept(visitor) { | |
return visitor.VisitParameter(this); | |
}; | |
$p.get_Type = function ParameterExpression_get_Type() { | |
return this.get_ParameterType(); | |
}; | |
}); | |
System.Linq.Expressions.PropertyExpression = $d.declare("System.Linq.Expressions.PropertyExpression", System.Linq.Expressions.MemberExpression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Type", p.get_Type, 6]], [["ctor", t.ctor, 6]], [["Type", 27, 0]]]; }; | |
$t.ctor = function PropertyExpression(expression, member) { | |
$t.$baseType.ctor.call(this, expression, member); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Type = function PropertyExpression_get_Type() { | |
return ($d.cast(this.get_Member(), System.Reflection.PropertyInfo)).get_PropertyType(); | |
}; | |
}); | |
System.Linq.Expressions.TypeBinaryExpression = $d.declare("System.Linq.Expressions.TypeBinaryExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Expression", p.get_Expression, 6], ["Accept", p.Accept, 6], ["get_TypeOperand", p.get_TypeOperand, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Expression", System.Linq.Expressions.Expression, 0], ["TypeOperand", 27, 2], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.typeOperand = null; | |
this.Expression = null; | |
}; | |
$p.get_Expression = function TypeBinaryExpression_get_Expression() { return this.Expression; }; | |
$p.set_Expression = function TypeBinaryExpression_set_Expression(value) { this.Expression = value;return value; }; | |
$t.ctor = function TypeBinaryExpression(expression, typeOperand, nodeKind) { | |
$t.$baseType.ctor.call(this, nodeKind); | |
this.set_Expression(expression); | |
this.typeOperand = typeOperand; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function TypeBinaryExpression_Accept(visitor) { | |
return visitor.VisitTypeBinary(this); | |
}; | |
$p.get_TypeOperand = function TypeBinaryExpression_get_TypeOperand() { | |
return this.typeOperand; | |
}; | |
$p.get_Type = function TypeBinaryExpression_get_Type() { | |
switch (this.get_NodeType()) { | |
case 44: | |
return this.get_TypeOperand(); | |
case 45: | |
return $d.typeOf(Boolean); | |
default: | |
throw new System.Exception.ctor$1("Unexpected NodeType: " + $d.toString($d.boxEnum(System.Linq.Expressions.ExpressionType, | |
this.get_NodeType()))); | |
} | |
}; | |
$p.Update = function TypeBinaryExpression_Update(expression) { | |
return this; | |
}; | |
}); | |
System.Linq.Expressions.UnaryExpression = $d.declare("System.Linq.Expressions.UnaryExpression", System.Linq.Expressions.Expression, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Operand", p.get_Operand, 6], ["get_Method", p.get_Method, 6], ["Accept", p.Accept, 6], ["get_Type", p.get_Type, 6], ["Update", p.Update, 6]], [["ctor", t.ctor, 6]], [["Operand", System.Linq.Expressions.Expression, 0], ["Method", System.Reflection.MethodInfo, 1], ["Type", 27, 3]]]; }; | |
$t.$ator = function() { | |
this.type = null; | |
this.Operand = null; | |
this.Method = null; | |
}; | |
$p.get_Operand = function UnaryExpression_get_Operand() { return this.Operand; }; | |
$p.set_Operand = function UnaryExpression_set_Operand(value) { this.Operand = value;return value; }; | |
$p.get_Method = function UnaryExpression_get_Method() { return this.Method; }; | |
$p.set_Method = function UnaryExpression_set_Method(value) { this.Method = value;return value; }; | |
$t.ctor = function UnaryExpression(nodeType, operand, method, type) { | |
$t.$baseType.ctor.call(this, nodeType); | |
this.set_Operand(operand); | |
this.set_Method(method); | |
this.type = type; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Accept = function UnaryExpression_Accept(visitor) { | |
return visitor.VisitUnary(this); | |
}; | |
$p.get_Type = function UnaryExpression_get_Type() { | |
return this.type; | |
}; | |
$p.Update = function UnaryExpression_Update(operand) { | |
return this; | |
}; | |
}); | |
System.Linq.IGrouping$2 = $d.declare("System.Linq.IGrouping`2", null, 322, $asm, function($t, $p, TKey, TElement) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(TElement), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, null, null, [["Key", TKey]]]; }; | |
}, ["TKey", "TElement"]); | |
System.Linq.Grouping$2 = $d.declare("System.Linq.Grouping`2", System.Object, 256, $asm, function($t, $p, TKey, TElement) { | |
$t.$intfs = function() { return [System.Linq.IGrouping$2(TKey, TElement), System.Collections.Generic.IEnumerable$1(TElement), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [0, null, [["GetEnumerator", p.GetEnumerator, 6], ["get_Key", p.get_Key, 6]], [["ctor", t.ctor, 6]], [["Key", TKey, 1]]]; }; | |
$t.$ator = function() { | |
this.key = $d.default(TKey); | |
this.elements = null; | |
}; | |
$t.ctor = function Grouping$2(key, elements) { | |
$t.$baseType.ctor.call(this); | |
this.key = key; | |
this.elements = elements; | |
}; | |
$t.ctor.prototype = $p; | |
$p.System$Collections$IEnumerable$GetEnumerator = function Grouping$2_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function Grouping$2_GetEnumerator() { | |
return this.elements.System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.get_Key = function Grouping$2_get_Key() { | |
return this.key; | |
}; | |
$p.System$Linq$IGrouping$2$get_Key = $p.get_Key; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TKey", "TElement"]); | |
System.Linq.ILookup$2 = $d.declare("System.Linq.ILookup`2", null, 322, $asm, function($t, $p, TKey, TElement) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(System.Linq.IGrouping$2(TKey, TElement)), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["Contains", null, 6]], null, [["Count", 45], ["this[]", System.Collections.Generic.IEnumerable$1(TElement), null, null, [["key", TKey, 0]]]]]; }; | |
}, ["TKey", "TElement"]); | |
System.Linq.IOrderedEnumerable$1 = $d.declare("System.Linq.IOrderedEnumerable`1", null, 322, $asm, function($t, $p, TElement) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(TElement), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [161, null, [["CreateOrderedEnumerable", null, 6]]]; }; | |
}, ["TElement"]); | |
System.Linq.Lookup$2 = $d.declare("System.Linq.Lookup`2", System.Object, 256, $asm, function($t, $p, TKey, TElement) { | |
$t.$intfs = function() { return [System.Linq.ILookup$2(TKey, TElement), System.Collections.Generic.IEnumerable$1(System.Linq.IGrouping$2(TKey, TElement)), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["GetEnumerator", p.GetEnumerator, 6], ["get_Count", p.get_Count, 6], ["get_Item", p.get_Item, 6], ["Contains", p.Contains, 6]], [["ctor", t.ctor, 6]], [["Count", 45, 1], ["this[]", System.Collections.Generic.IEnumerable$1(TElement), 2, null, [["key", TKey, 0]]]]]; }; | |
$t.$ator = function() { | |
this.dictionary = new (System.Collections.Generic.Dictionary$2(TKey, System.Linq.IGrouping$2(TKey, | |
TElement)).ctor)(); | |
}; | |
$t.ctor = function Lookup$2(elements) { | |
$t.$baseType.ctor.call(this); | |
var $iter = elements; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
this.dictionary.set_Item(item.System$Linq$IGrouping$2$get_Key(), item); | |
} | |
}; | |
$t.ctor.prototype = $p; | |
$p.System$Collections$IEnumerable$GetEnumerator = function Lookup$2_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function Lookup$2_GetEnumerator() { | |
return this.dictionary.get_Values().System$Collections$Generic$IEnumerable$1$GetEnumerator(); | |
}; | |
$p.get_Count = function Lookup$2_get_Count() { | |
return this.dictionary.get_Count(); | |
}; | |
$p.get_Item = function Lookup$2_get_Item(key) { | |
return this.dictionary.get_Item(key); | |
}; | |
$p.Contains = function Lookup$2_Contains(key) { | |
return this.dictionary.ContainsKey(key); | |
}; | |
$p.System$Linq$ILookup$2$get_Count = $p.get_Count; | |
$p.System$Linq$ILookup$2$get_Item = $p.get_Item; | |
$p.System$Linq$ILookup$2$Contains = $p.Contains; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TKey", "TElement"]); | |
System.Linq.OrderedEnumerable$1 = $d.declare("System.Linq.OrderedEnumerable`1", System.Object, 256, $asm, function($t, $p, TElement) { | |
$t.$intfs = function() { return [System.Linq.IOrderedEnumerable$1(TElement), System.Collections.Generic.IEnumerable$1(TElement), System.Collections.IEnumerable]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["GetEnumerator", p.GetEnumerator, 6], ["CreateOrderedEnumerable", p.CreateOrderedEnumerable, 6]]]; }; | |
$t.$ator = function() { | |
this.comparers = null; | |
this.source = null; | |
this.storage = null; | |
}; | |
$t.ctor = function OrderedEnumerable$1(source, comparers) { | |
$t.$baseType.ctor.call(this); | |
this.source = source; | |
this.comparers = System.Linq.Enumerable.ToList(System.Collections.IComparer, comparers); | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function OrderedEnumerable$1_Create(TKey, source, keySelector, comparer, isDescending) { | |
return new (System.Linq.OrderedEnumerable$1(TElement).ctor)(source, $d.array(System.Collections.IComparer, | |
[new (System.Linq.OrderedEnumerable$1.KeyComparer$2(TElement, TElement, TKey).ctor)(keySelector, | |
comparer, isDescending)])); | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function OrderedEnumerable$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function OrderedEnumerable$1_GetEnumerator() { | |
if (this.storage == null) { | |
this.storage = System.Linq.Enumerable.ToList(TElement, this.source); | |
this.storage.Sort$2($d.delegate(function(x, y) { | |
for (var $i1 = 0, $length1 = this.comparers.storage.length; $i1 != $length1; $i1++) { | |
var comparer = this.comparers.storage[$i1]; | |
var result = comparer.System$Collections$IComparer$Compare(x, y); | |
if (result != 0) | |
return result; | |
} | |
return 0; | |
}, this)); | |
} | |
return this.storage.GetEnumerator(); | |
}; | |
$p.CreateOrderedEnumerable = function OrderedEnumerable$1_CreateOrderedEnumerable(TKey, keySelector, comparer, descending) { | |
return new (System.Linq.OrderedEnumerable$1(TElement).ctor)(this.source, System.Linq.Enumerable.ToArray(System.Collections.IComparer, | |
System.Linq.Enumerable.Concat(System.Collections.IComparer, this.comparers, $d.array(System.Collections.IComparer, | |
[new (System.Linq.OrderedEnumerable$1.KeyComparer$2(TElement, TElement, TKey).ctor)(keySelector, | |
comparer, descending)])))); | |
}; | |
$p.System$Linq$IOrderedEnumerable$1$CreateOrderedEnumerable = $p.CreateOrderedEnumerable; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
}, ["TElement"]); | |
System.Linq.OrderedEnumerable$1.KeyComparer$2 = $d.declare("KeyComparer`2", System.Object, 256, System.Linq.OrderedEnumerable$1, function($t, $p, TElement, T, TKey) { | |
$t.$intfs = [System.Collections.IComparer]; | |
$t.$typeInfo = function(t, p) { return [3, null, [["Compare", p.Compare, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this.keySelector = null; | |
this.comparer = null; | |
this.isDescending = false; | |
}; | |
$t.ctor = function KeyComparer$2(keySelector, comparer, isDescending) { | |
$t.$baseType.ctor.call(this); | |
this.keySelector = keySelector; | |
this.comparer = comparer; | |
this.isDescending = isDescending; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Compare = function KeyComparer$2_Compare(x, y) { | |
var xKey = this.keySelector($d.cast(x, T)); | |
var yKey = this.keySelector($d.cast(y, T)); | |
var result = this.comparer.System$Collections$Generic$IComparer$1$Compare(xKey, yKey); | |
if (this.isDescending) | |
result = -result; | |
return result; | |
}; | |
$p.System$Collections$IComparer$Compare = $p.Compare; | |
}, ["TElement", "T", "TKey"]); | |
System.Math = $d.declare("System.Math", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["PI", 51, 86, 3.14159265358979], ["E", 51, 86, 2.71828182845905]], [["Acos", t.Acos, 22], ["Asin", t.Asin, 22], ["Atan", t.Atan, 22], ["Atan2", t.Atan2, 22], ["Ceiling", t.Ceiling, 22], ["Ceiling", t.Ceiling$1, 22], ["Cos", t.Cos, 22], ["Cosh", t.Cosh, 22], ["Floor", t.Floor, 22], ["Floor", t.Floor$1, 22], ["Exp", t.Exp, 22], ["Pow", t.Pow, 22], ["Sin", t.Sin, 22], ["Tan", t.Tan, 22], ["Sinh", t.Sinh, 22], ["Tanh", t.Tanh, 22], ["Round", t.Round, 22], ["Sqrt", t.Sqrt, 22], ["Round", t.Round$1, 22], ["Abs", t.Abs$1, 22], ["Truncate", t.Truncate, 22], ["Abs", t.Abs, 22], ["Abs", t.Abs$3, 22], ["Abs", t.Abs$2, 22], ["Round", t.Round$2, 22], ["Sign", t.Sign, 22], ["Max", t.Max$6, 22], ["Max", t.Max, 22], ["Max", t.Max$7, 22], ["Max", t.Max$10, 22], ["Max", t.Max$4, 22], ["Max", t.Max$8, 22], ["Max", t.Max$5, 22], ["Max", t.Max$9, 22], ["Max", t.Max$3, 22], ["Max", t.Max$2, 22], ["Max", t.Max$1, 22], ["Min", t.Min$6, 22], ["Min", t.Min, 22], ["Min", t.Min$7, 22], ["Min", t.Min$10, 22], ["Min", t.Min$4, 22], ["Min", t.Min$8, 22], ["Min", t.Min$5, 22], ["Min", t.Min$9, 22], ["Min", t.Min$3, 22], ["Min", t.Min$2, 22], ["Min", t.Min$1, 22], ["Log", t.Log, 22], ["Log10", t.Log10, 22], ["Log", t.Log$1, 22]]]; }; | |
$t.cctor = function() { | |
$t.PI = 3.14159265358979; | |
$t.E = 2.71828182845905; | |
}; | |
$t.Acos = function Math_Acos(d) { | |
return Math.acos(d); | |
}; | |
$t.Asin = function Math_Asin(d) { | |
return Math.asin(d); | |
}; | |
$t.Atan = function Math_Atan(d) { | |
return Math.atan(d); | |
}; | |
$t.Atan2 = function Math_Atan2(y, x) { | |
return Math.atan2(y, x); | |
}; | |
$t.Ceiling = function Math_Ceiling(d) { | |
return Math.ceil(d); | |
}; | |
$t.Ceiling$1 = function Math_Ceiling(a) { | |
return Math.ceil(a); | |
}; | |
$t.Cos = function Math_Cos(d) { | |
return Math.cos(d); | |
}; | |
$t.Cosh = function Math_Cosh(value) { | |
return Math.cosh(value); | |
}; | |
$t.Floor = function Math_Floor(d) { | |
return Math.floor(d); | |
}; | |
$t.Floor$1 = function Math_Floor(d) { | |
return Math.floor(d); | |
}; | |
$t.Exp = function Math_Exp(d) { | |
return Math.exp(d); | |
}; | |
$t.Pow = function Math_Pow(exponentBase, exponent) { | |
return Math.pow(exponentBase, exponent); | |
}; | |
$t.Sin = function Math_Sin(a) { | |
return Math.sin(a); | |
}; | |
$t.Tan = function Math_Tan(a) { | |
return Math.tan(a); | |
}; | |
$t.Sinh = function Math_Sinh(value) { | |
return Math.sinh(value); | |
}; | |
$t.Tanh = function Math_Tanh(value) { | |
return Math.tanh(value); | |
}; | |
$t.Round = function Math_Round(a) { | |
return Math.round(a); | |
}; | |
$t.Sqrt = function Math_Sqrt(d) { | |
return Math.sqrt(d); | |
}; | |
$t.Round$1 = function Math_Round(value, digits) { | |
if (digits < 0 || digits > 15) | |
throw new System.ArgumentOutOfRangeException.ctor$1("Value is too small or too big."); | |
if (digits == 0) | |
return $t.Round(value); | |
return $t.Round$2(value, digits, 0); | |
}; | |
$t.Abs$1 = function Math_Abs(value) { | |
return Math.abs(value); | |
}; | |
$t.Truncate = function Math_Truncate(value) { | |
return (value | 0); | |
}; | |
$t.Abs = function Math_Abs(value) { | |
return Math.abs(value); | |
}; | |
$t.Abs$3 = function Math_Abs(value) { | |
return Math.abs(value); | |
}; | |
$t.Abs$2 = function Math_Abs(value) { | |
return Math.abs(value); | |
}; | |
$t.Round$2 = function Math_Round(value, digits, mode) { | |
var s = value.toString(); | |
var isNegative = value < 0; | |
if (isNegative) | |
s = s.Substring(1); | |
var decimalIndex = s.IndexOf(46 /*'.'*/); | |
if (decimalIndex == -1) | |
return value; | |
var integerPart = s.Substring$1(0, decimalIndex); | |
var intValue = System.Int32.Parse(integerPart); | |
var firstDecimalDigit = System.Int32.Parse(String.fromCharCode(s.get_Chars(decimalIndex + 1))); | |
if (digits == 0 && firstDecimalDigit == 5) { | |
switch (mode) { | |
case 1: | |
intValue++; | |
break; | |
case 0: | |
if (intValue % 2 == 1) | |
intValue++; | |
break; | |
} | |
if (isNegative) | |
intValue = -intValue; | |
return intValue; | |
} | |
else { | |
var decimalPart = new (System.Collections.Generic.Stack$1(System.Int32).ctor)(); | |
var digit = digits; | |
var carry = 0; | |
for (var i = $t.Min$4(decimalIndex + digits, s.length - 1); i > decimalIndex && digit >= 1; i--, digit--) { | |
var digitValue = System.Int32.Parse(String.fromCharCode(s.get_Chars(i))) + carry; | |
if (i < s.length - 1) { | |
var nextDigit = s.get_Chars(i + 1); | |
var nextDigitValue = System.Int32.Parse(String.fromCharCode(nextDigit)); | |
if (digit == digits && nextDigitValue == 5) { | |
switch (mode) { | |
case 1: | |
digitValue++; | |
break; | |
case 0: | |
if (digitValue % 2 == 1) { | |
digitValue++; | |
} | |
break; | |
} | |
} | |
else | |
if (digit == digits && nextDigitValue > 5) | |
digitValue++; | |
} | |
if (digitValue == 10) { | |
digitValue = 0; | |
carry = 1; | |
} | |
else { | |
carry = 0; | |
} | |
if (decimalPart.get_Count() > 0 || digitValue != 0) | |
decimalPart.Push(digitValue); | |
} | |
if (carry > 0) | |
intValue++; | |
var tempArray = new Array(decimalPart.get_Count()); | |
decimalPart.CopyTo(tempArray, 0); | |
var newString = $d.toString(intValue) + "." + tempArray.join(""); | |
if (isNegative) | |
newString = "-" + newString; | |
return System.Double.Parse(newString); | |
} | |
}; | |
$t.Sign = function Math_Sign(value) { | |
if (value < 0) { | |
return -1; | |
} | |
if (value > 0) { | |
return 1; | |
} | |
if (value == 0) { | |
return 0; | |
} | |
throw new System.ArgumentOutOfRangeException.ctor$1("value is NaN"); | |
}; | |
$t.Max$6 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$7 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$10 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$4 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$8 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$5 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$9 = function Math_Max(val1, val2) { | |
if (val1 < val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Max$3 = function Math_Max(val1, val2) { | |
if (val1 > val2 || System.Single.IsNaN(val1)) | |
return val1; | |
else | |
return val2; | |
}; | |
$t.Max$2 = function Math_Max(val1, val2) { | |
if (val1 > val2 || System.Double.IsNaN(val1)) | |
return val1; | |
else | |
return val2; | |
}; | |
$t.Max$1 = function Math_Max(val1, val2) { | |
if (val1 > val2) | |
return val1; | |
else | |
return val2; | |
}; | |
$t.Min$6 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$7 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$10 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$4 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$8 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$5 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$9 = function Math_Min(val1, val2) { | |
if (val1 > val2) | |
return val2; | |
else | |
return val1; | |
}; | |
$t.Min$3 = function Math_Min(val1, val2) { | |
if (val1 < val2 || System.Single.IsNaN(val1)) | |
return val1; | |
else | |
return val2; | |
}; | |
$t.Min$2 = function Math_Min(val1, val2) { | |
if (val1 < val2 || System.Double.IsNaN(val1)) | |
return val1; | |
else | |
return val2; | |
}; | |
$t.Min$1 = function Math_Min(val1, val2) { | |
return Math.min(val1, val2); | |
}; | |
$t.Log = function Math_Log(d) { | |
return Math.log(d); | |
}; | |
$t.Log10 = function Math_Log10(d) { | |
return Math.log(d) / Math.LN10; | |
}; | |
$t.Log$1 = function Math_Log(a, newBase) { | |
if (System.Double.IsNaN(a) || System.Double.IsNaN(newBase) || newBase == 1 || (a != 1 && (newBase == 0 || System.Double.IsPositiveInfinity(newBase)))) { | |
return NaN; | |
} | |
return Math.log(a) / Math.log(newBase); | |
}; | |
}); | |
System.NotImplementedException = $d.declare("System.NotImplementedException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function NotImplementedException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function NotImplementedException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function NotImplementedException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.NotSupportedException = $d.declare("System.NotSupportedException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function NotSupportedException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function NotSupportedException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function NotSupportedException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.Nullable$1 = $d.declare("System.Nullable`1", null, 312, $asm, function($t, $p, T) { | |
$t.$underlyingType = T; | |
}, ["T"]); | |
System.NullReferenceException = $d.declare("System.NullReferenceException", System.SystemException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function NullReferenceException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_NullReferenceException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function NullReferenceException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function NullReferenceException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.ObjectDisposedException = $d.declare("System.ObjectDisposedException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$3", t.ctor$3, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function ObjectDisposedException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function ObjectDisposedException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$3 = function ObjectDisposedException(objectName, message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$2 = function ObjectDisposedException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.OverflowException = $d.declare("System.OverflowException", System.ArithmeticException, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6]]]; }; | |
$t.ctor = function OverflowException() { | |
$t.$baseType.ctor$1.call(this, System.Environment.GetResourceString("Arg_OverflowException")); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function OverflowException(message) { | |
$t.$baseType.ctor$1.call(this, message); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function OverflowException(message, innerException) { | |
$t.$baseType.ctor$2.call(this, message, innerException); | |
}; | |
$t.ctor$2.prototype = $p; | |
}); | |
System.Random = $d.declare("System.Random", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Sample", p.Sample, 4], ["Next", p.Next, 6], ["Next", p.Next$2, 6], ["Next", p.Next$1, 6], ["NextDouble", p.NextDouble, 6], ["NextBytes", p.NextBytes, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]]]; }; | |
$t.cctor = function() { | |
$t.MBIG = 2147483647; | |
$t.MSEED = 161803398; | |
$t.MZ = 0; | |
}; | |
$t.$ator = function() { | |
this.inext = 0; | |
this.inextp = 0; | |
this.seedArray = $d.array(System.Int32, 56); | |
}; | |
$t.ctor = function Random() { | |
$t.ctor$1.call(this, ((Math.random() * 2147483647) | 0)); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function Random(seed) { | |
$t.$baseType.ctor.call(this); | |
var ii; | |
var mj, mk; | |
var subtraction = (seed == -2147483648) ? 2147483647 : System.Math.Abs$2(seed); | |
mj = 161803398 - subtraction; | |
this.seedArray[55] = mj; | |
mk = 1; | |
for (var i = 1; i < 55; i++) { | |
ii = (21 * i) % 55; | |
this.seedArray[ii] = mk; | |
mk = mj - mk; | |
if (mk < 0) | |
mk += 2147483647; | |
mj = this.seedArray[ii]; | |
} | |
for (var k = 1; k < 5; k++) { | |
for (var i = 1; i < 56; i++) { | |
this.seedArray[i] -= this.seedArray[1 + (i + 30) % 55]; | |
if (this.seedArray[i] < 0) | |
this.seedArray[i] += 2147483647; | |
} | |
} | |
this.inext = 0; | |
this.inextp = 21; | |
seed = 1; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.Sample = function Random_Sample() { | |
return (this.InternalSample() * 4.6566128752458E-10); | |
}; | |
$p.InternalSample = function Random_InternalSample() { | |
var retVal; | |
var locINext = this.inext; | |
var locINextp = this.inextp; | |
if (++locINext >= 56) | |
locINext = 1; | |
if (++locINextp >= 56) | |
locINextp = 1; | |
retVal = this.seedArray[locINext] - this.seedArray[locINextp]; | |
if (retVal == 2147483647) | |
retVal--; | |
if (retVal < 0) | |
retVal += 2147483647; | |
this.seedArray[locINext] = retVal; | |
this.inext = locINext; | |
this.inextp = locINextp; | |
return retVal; | |
}; | |
$p.Next = function Random_Next() { | |
return this.InternalSample(); | |
}; | |
$p.GetSampleForLargeRange = function Random_GetSampleForLargeRange() { | |
var result = this.InternalSample(); | |
var negative = (this.InternalSample() % 2 == 0) ? true : false; | |
if (negative) { | |
result = -result; | |
} | |
var d = result; | |
d += 2147483646; | |
d /= 4294967293; | |
return d; | |
}; | |
$p.Next$2 = function Random_Next(minValue, maxValue) { | |
if (minValue > maxValue) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("minValue"); | |
} | |
var range = maxValue - minValue; | |
if (range <= 2147483647) { | |
return (((this.Sample() * range) | 0) + minValue); | |
} | |
else { | |
return (($d.toInt64((this.GetSampleForLargeRange() * range)) + minValue) | 0); | |
} | |
}; | |
$p.Next$1 = function Random_Next(maxValue) { | |
if (maxValue < 0) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("maxValue"); | |
} | |
return ((this.Sample() * maxValue) | 0); | |
}; | |
$p.NextDouble = function Random_NextDouble() { | |
return this.Sample(); | |
}; | |
$p.NextBytes = function Random_NextBytes(buffer) { | |
if (buffer == null) | |
throw new System.ArgumentNullException.ctor$1("buffer"); | |
for (var i = 0; i < buffer.length; i++) { | |
buffer[i] = (this.InternalSample() & 0xFF); | |
} | |
}; | |
}); | |
System.Activator = $d.declare("System.Activator", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["CreateInstance", t.CreateInstance$3, 22], ["CreateInstance", t.CreateInstance$2, 22], ["CreateInstance", t.CreateInstance, 22], ["CreateInstance", t.CreateInstance$1, 22], ["CreateInstance", t.CreateInstance$4, 22]]]; }; | |
$t.CreateInstance$3 = function Activator_CreateInstance(type, bindingAttr, binder, args, culture) { | |
var actualCount = (args != null) ? args.length : 0; | |
return System.Linq.Enumerable.Single$1(System.Reflection.ConstructorInfo, type.GetConstructors(), | |
$d.delegate(function(x) { | |
return x.parameters.length == actualCount; | |
}, this)).Invoke$2(args); | |
}; | |
$t.CreateInstance$2 = function Activator_CreateInstance(type, args) { | |
return $t.CreateInstance$3(type, 532, null, args, null); | |
}; | |
$t.CreateInstance = function Activator_CreateInstance(type) { | |
return $t.CreateInstance$1(type, false); | |
}; | |
$t.CreateInstance$1 = function Activator_CreateInstance(type, nonPublic) { | |
return System.Linq.Enumerable.Single$1(System.Reflection.ConstructorInfo, type.GetConstructors(), | |
$d.delegate(function(x) { | |
return x.parameters.length == 0; | |
}, this)).Invoke$2(null); | |
}; | |
$t.CreateInstance$4 = function Activator_CreateInstance(T) { | |
return $t.CreateInstance$1($d.typeOf(T), false); | |
}; | |
}); | |
System.Reflection.ICustomAttributeProvider = $d.declare("System.Reflection.ICustomAttributeProvider", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetCustomAttributes", null, 6], ["GetCustomAttributes", null, 6], ["IsDefined", null, 6]]]; }; | |
}); | |
System.Reflection.Assembly = $d.declare("System.Reflection.Assembly", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["GetManifestResourceString", p.GetManifestResourceString, 6], ["GetManifestResourceBytes", p.GetManifestResourceBytes, 6], ["GetManifestResourceNames", p.GetManifestResourceNames, 6], ["GetManifestResourceStream", p.GetManifestResourceStream, 6], ["get_CodeBase", p.get_CodeBase, 6], ["get_FullName", p.get_FullName, 6], ["get_EntryPoint", p.get_EntryPoint, 6], ["get_Location", p.get_Location, 6], ["CreateQualifiedName", t.CreateQualifiedName, 22], ["GetAssembly", t.GetAssembly, 22], ["GetExecutingAssembly", t.GetExecutingAssembly, 22], ["GetCallingAssembly", t.GetCallingAssembly, 22], ["GetEntryAssembly", t.GetEntryAssembly, 22], ["Load", t.Load, 22], ["GetName", p.GetName, 6], ["GetName", p.GetName$1, 6], ["GetType", p.GetType$1, 6], ["GetType", p.GetType$2, 6], ["GetType", p.GetType$3, 6], ["GetTypes", p.GetTypes, 6], ["GetCustomAttributes", p.GetCustomAttributes, 6], ["GetCustomAttributes", p.GetCustomAttributes$1, 6], ["IsDefined", p.IsDefined, 6], ["CreateInstance", p.CreateInstance, 6], ["CreateInstance", p.CreateInstance$1, 6], ["CreateInstance", p.CreateInstance$2, 6], ["GetReferencedAssemblies", p.GetReferencedAssemblies, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 5]], [["CodeBase", 20, 4], ["FullName", 20, 5], ["EntryPoint", System.Reflection.MethodInfo, 6], ["Location", 20, 7]]]; }; | |
$t.$ator = function() { | |
this.self = null; | |
this.attributes = null; | |
this.typesByName = null; | |
this.typesByNamesUp = null; | |
this.types = null; | |
}; | |
$t.ctor = function Assembly(self, attributes) { | |
$t.$baseType.ctor.call(this); | |
this.self = self; | |
this.attributes = (attributes != null) ? $d.array(System.Attribute, attributes) : System.Attribute().EmptyAttributes; | |
}; | |
$t.ctor.prototype = $p; | |
$p.GetManifestResourceString = function Assembly_GetManifestResourceString(name) { | |
var result = this.self.resources[name]; | |
return result; | |
}; | |
$p.GetManifestResourceBytes = function Assembly_GetManifestResourceBytes(name) { | |
var bytes = System.IO.Base64Decoder.Decode(this.self.resources[name]); | |
return bytes; | |
}; | |
$p.GetManifestResourceNames = function Assembly_GetManifestResourceNames() { | |
return $d.array(String, Object.keys(this.self.resources)); | |
}; | |
$p.GetManifestResourceStream = function Assembly_GetManifestResourceStream(name) { | |
var bytes = System.IO.Base64Decoder.Decode(this.self.resources[name]); | |
var result = new System.IO.MemoryStream.ctor$1(bytes); | |
return result; | |
}; | |
$p.get_CodeBase = function Assembly_get_CodeBase() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_FullName = function Assembly_get_FullName() { | |
return this.self.fullName; | |
}; | |
$p.get_EntryPoint = function Assembly_get_EntryPoint() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_Location = function Assembly_get_Location() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$t.CreateQualifiedName = function Assembly_CreateQualifiedName(assemblyName, typeName) { | |
return typeName + ", " + assemblyName; | |
}; | |
$t.GetAssembly = function Assembly_GetAssembly(type) { | |
if (type == null) | |
throw new System.ArgumentNullException.ctor$1("type"); | |
return type.get_Assembly(); | |
}; | |
$t.GetExecutingAssembly = function Assembly_GetExecutingAssembly() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$t.GetCallingAssembly = function Assembly_GetCallingAssembly() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$t.GetEntryAssembly = function Assembly_GetEntryAssembly() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$t.Load = function Assembly_Load(name) { | |
var result = $d.$assemblies[name] || require(name); | |
return $d.assemblyOf(result); | |
}; | |
$p.GetName = function Assembly_GetName() { | |
return this.GetName$1(false); | |
}; | |
$p.GetName$1 = function Assembly_GetName(copiedName) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetType$1 = function Assembly_GetType(name) { | |
return this.GetType$3(name, false, false); | |
}; | |
$p.GetType$2 = function Assembly_GetType(name, throwOnError) { | |
return this.GetType$3(name, throwOnError, false); | |
}; | |
$p.GetType$3 = function Assembly_GetType(name, throwOnError, ignoreCase) { | |
var typesDict = ignoreCase ? this.typesByNamesUp : this.typesByName; | |
if (typesDict == null) { | |
typesDict = {}; | |
var types = this.self.types; | |
for (var i = 0; i < types.length; i++) { | |
var typeName = types[i].$typeName; | |
typesDict[ignoreCase ? typeName.toUpperCase() : typeName] = types[i]; | |
} | |
if (ignoreCase) | |
this.typesByNamesUp = typesDict; | |
else | |
this.typesByName = typesDict; | |
} | |
var result = typesDict[ignoreCase ? name.toUpperCase() : name]; | |
if (result == null && throwOnError) | |
throw new System.InvalidOperationException.ctor$1("Type not found: " + name); | |
if (result != null) | |
return $d.typeOf(result); | |
return null; | |
}; | |
$p.GetTypes = function Assembly_GetTypes() { | |
if (this.types == null) { | |
this.types = $d.typesOf(this.self.types); | |
} | |
return this.types; | |
}; | |
$p.GetCustomAttributes = function Assembly_GetCustomAttributes(inherit) { | |
return System.Linq.Enumerable.ToArray(System.Attribute, this.attributes); | |
}; | |
$p.GetCustomAttributes$1 = function Assembly_GetCustomAttributes(attributeType, inherit) { | |
return System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Where(System.Object, | |
this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this))); | |
}; | |
$p.IsDefined = function Assembly_IsDefined(attributeType, inherit) { | |
return System.Linq.Enumerable.Any$1(System.Object, this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this)); | |
}; | |
$p.CreateInstance = function Assembly_CreateInstance(typeName) { | |
return this.CreateInstance$2(typeName, false, 20, null, null, null, null); | |
}; | |
$p.CreateInstance$1 = function Assembly_CreateInstance(typeName, ignoreCase) { | |
return this.CreateInstance$2(typeName, ignoreCase, 20, null, null, null, null); | |
}; | |
$p.CreateInstance$2 = function Assembly_CreateInstance(typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes) { | |
var type = this.GetType$3(typeName, false, ignoreCase); | |
if (type == null) | |
return null; | |
else | |
return System.Activator.CreateInstance$2(type, $d.array(System.Object, [$d.boxEnum(System.Reflection.BindingFlags, | |
bindingAttr), binder, args, culture, activationAttributes])); | |
}; | |
$p.GetReferencedAssemblies = function Assembly_GetReferencedAssemblies() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.ToString = function Assembly_ToString() { | |
return this.get_FullName() || $t.$baseType.prototype.ToString.call(this); | |
}; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1 = $p.GetCustomAttributes$1; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes = $p.GetCustomAttributes; | |
$p.System$Reflection$ICustomAttributeProvider$IsDefined = $p.IsDefined; | |
}); | |
System.Reflection.AssemblyCompanyAttribute = $d.declare("System.Reflection.AssemblyCompanyAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Company", p.get_Company, 6]], [["ctor", t.ctor, 6]], [["Company", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_company = null; | |
}; | |
$p.get_Company = function AssemblyCompanyAttribute_get_Company() { | |
return this.m_company; | |
}; | |
$t.ctor = function AssemblyCompanyAttribute(company) { | |
$t.$baseType.ctor.call(this); | |
this.m_company = company; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyConfigurationAttribute = $d.declare("System.Reflection.AssemblyConfigurationAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Configuration", p.get_Configuration, 6]], [["ctor", t.ctor, 6]], [["Configuration", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_configuration = null; | |
}; | |
$p.get_Configuration = function AssemblyConfigurationAttribute_get_Configuration() { | |
return this.m_configuration; | |
}; | |
$t.ctor = function AssemblyConfigurationAttribute(configuration) { | |
$t.$baseType.ctor.call(this); | |
this.m_configuration = configuration; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyCopyrightAttribute = $d.declare("System.Reflection.AssemblyCopyrightAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Copyright", p.get_Copyright, 6]], [["ctor", t.ctor, 6]], [["Copyright", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_copyright = null; | |
}; | |
$p.get_Copyright = function AssemblyCopyrightAttribute_get_Copyright() { | |
return this.m_copyright; | |
}; | |
$t.ctor = function AssemblyCopyrightAttribute(copyright) { | |
$t.$baseType.ctor.call(this); | |
this.m_copyright = copyright; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyCultureAttribute = $d.declare("System.Reflection.AssemblyCultureAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Culture", p.get_Culture, 6]], [["ctor", t.ctor, 6]], [["Culture", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_culture = null; | |
}; | |
$p.get_Culture = function AssemblyCultureAttribute_get_Culture() { | |
return this.m_culture; | |
}; | |
$t.ctor = function AssemblyCultureAttribute(culture) { | |
$t.$baseType.ctor.call(this); | |
this.m_culture = culture; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyDescriptionAttribute = $d.declare("System.Reflection.AssemblyDescriptionAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Description", p.get_Description, 6]], [["ctor", t.ctor, 6]], [["Description", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_description = null; | |
}; | |
$p.get_Description = function AssemblyDescriptionAttribute_get_Description() { | |
return this.m_description; | |
}; | |
$t.ctor = function AssemblyDescriptionAttribute(description) { | |
$t.$baseType.ctor.call(this); | |
this.m_description = description; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyFileVersionAttribute = $d.declare("System.Reflection.AssemblyFileVersionAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Version", p.get_Version, 6]], [["ctor", t.ctor, 6]], [["Version", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this._version = null; | |
}; | |
$p.get_Version = function AssemblyFileVersionAttribute_get_Version() { | |
return this._version; | |
}; | |
$t.ctor = function AssemblyFileVersionAttribute(version) { | |
$t.$baseType.ctor.call(this); | |
if (version == null) | |
throw new System.ArgumentNullException.ctor$1("version"); | |
this._version = version; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyName = $d.declare("System.Reflection.AssemblyName", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Name", p.get_Name, 6], ["set_Name", p.set_Name, 6], ["get_CultureInfo", p.get_CultureInfo, 6], ["set_CultureInfo", p.set_CultureInfo, 6], ["get_CultureName", p.get_CultureName, 6], ["get_CodeBase", p.get_CodeBase, 6], ["set_CodeBase", p.set_CodeBase, 6], ["get_FullName", p.get_FullName, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]], [["Name", 20, 0, 1], ["CultureInfo", System.Globalization.CultureInfo, 2, 3], ["CultureName", 20, 4], ["CodeBase", 20, 5, 6], ["FullName", 20, 7]]]; }; | |
$t.$ator = function() { | |
this._CultureInfo = null; | |
this._CodeBase = null; | |
this.Name = null; | |
}; | |
$p.get_Name = function AssemblyName_get_Name() { return this.Name; }; | |
$p.set_Name = function AssemblyName_set_Name(value) { this.Name = value;return value; }; | |
$p.get_CultureInfo = function AssemblyName_get_CultureInfo() { | |
return this._CultureInfo; | |
}; | |
$p.set_CultureInfo = function AssemblyName_set_CultureInfo(value) { | |
this._CultureInfo = value; | |
return value; | |
}; | |
$p.get_CultureName = function AssemblyName_get_CultureName() { | |
if (this._CultureInfo != null) | |
return this._CultureInfo.get_Name(); | |
else | |
return null; | |
}; | |
$p.get_CodeBase = function AssemblyName_get_CodeBase() { | |
return this._CodeBase; | |
}; | |
$p.set_CodeBase = function AssemblyName_set_CodeBase(value) { | |
this._CodeBase = value; | |
return value; | |
}; | |
$p.get_FullName = function AssemblyName_get_FullName() { | |
return this.get_Name(); | |
}; | |
$t.ctor = function AssemblyName() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function AssemblyName(assemblyName) { | |
$t.$baseType.ctor.call(this); | |
this.set_Name(assemblyName); | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.ToString = function AssemblyName_ToString() { | |
return this.get_FullName() || $t.$baseType.prototype.ToString.call(this); | |
}; | |
}); | |
System.Reflection.AssemblyProductAttribute = $d.declare("System.Reflection.AssemblyProductAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Product", p.get_Product, 6]], [["ctor", t.ctor, 6]], [["Product", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_product = null; | |
}; | |
$p.get_Product = function AssemblyProductAttribute_get_Product() { | |
return this.m_product; | |
}; | |
$t.ctor = function AssemblyProductAttribute(product) { | |
$t.$baseType.ctor.call(this); | |
this.m_product = product; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyTitleAttribute = $d.declare("System.Reflection.AssemblyTitleAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Title", p.get_Title, 6]], [["ctor", t.ctor, 6]], [["Title", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_title = null; | |
}; | |
$p.get_Title = function AssemblyTitleAttribute_get_Title() { | |
return this.m_title; | |
}; | |
$t.ctor = function AssemblyTitleAttribute(title) { | |
$t.$baseType.ctor.call(this); | |
this.m_title = title; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyTrademarkAttribute = $d.declare("System.Reflection.AssemblyTrademarkAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Trademark", p.get_Trademark, 6]], [["ctor", t.ctor, 6]], [["Trademark", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_trademark = null; | |
}; | |
$p.get_Trademark = function AssemblyTrademarkAttribute_get_Trademark() { | |
return this.m_trademark; | |
}; | |
$t.ctor = function AssemblyTrademarkAttribute(trademark) { | |
$t.$baseType.ctor.call(this); | |
this.m_trademark = trademark; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.AssemblyVersionAttribute = $d.declare("System.Reflection.AssemblyVersionAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Version", p.get_Version, 6]], [["ctor", t.ctor, 6]], [["Version", 20, 0]], null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(1);$obj.set_Inherited(false);return $obj; }).call(this)]]; }; | |
$t.$ator = function() { | |
this.m_version = null; | |
}; | |
$p.get_Version = function AssemblyVersionAttribute_get_Version() { | |
return this.m_version; | |
}; | |
$t.ctor = function AssemblyVersionAttribute(version) { | |
$t.$baseType.ctor.call(this); | |
this.m_version = version; | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.Binder = $d.declare("System.Reflection.Binder", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function Binder() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Reflection.BindingFlags = $d.declareEnum("System.Reflection.BindingFlags", 45, $asm, 289, ["Default", "IgnoreCase", "DeclaredOnly", "Instance", "Static", "Public", "NonPublic", "FlattenHierarchy", "InvokeMethod", "CreateInstance", "GetField", "SetField", "GetProperty", "SetProperty", "PutDispProperty", "PutRefDispProperty", "ExactBinding", "SuppressChangeType", "OptionalParamBinding", "IgnoreReturn"], [0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x1000000]); | |
System.Reflection.CallingConventions = $d.declareEnum("System.Reflection.CallingConventions", 45, $asm, 289, ["Standard", "VarArgs", "Any", "HasThis", "ExplicitThis"], [0x1, 0x2, 0x3, 0x20, 0x40]); | |
System.Reflection.MemberInfo = $d.declare("System.Reflection.MemberInfo", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [129, [["name", 20, 36], ["attributes", $d.arrayType(System.Attribute), 36]], [["get_Name", p.get_Name, 6], ["get_DeclaringType", p.get_DeclaringType, 6], ["GetCustomAttributes", p.GetCustomAttributes, 6], ["GetCustomAttributes", p.GetCustomAttributes$1, 6], ["IsDefined", p.IsDefined, 6]], [["ctor", t.ctor, 4]], [["MemberType", System.Reflection.MemberTypes], ["Name", 20, 0], ["DeclaringType", 27, 1]]]; }; | |
$t.$ator = function() { | |
this.name = null; | |
this.attributes = null; | |
this.declaringType = null; | |
}; | |
$t.ctor = function MemberInfo(name, attributes) { | |
$t.$baseType.ctor.call(this); | |
this.name = name; | |
this.attributes = (attributes != null) ? $d.array(System.Attribute, attributes) : System.Attribute().EmptyAttributes; | |
}; | |
$p.get_Name = function MemberInfo_get_Name() { | |
return this.name; | |
}; | |
$p.get_DeclaringType = function MemberInfo_get_DeclaringType() { | |
return this.declaringType ? $d.typeOf(this.declaringType) : null; | |
}; | |
$p.GetCustomAttributes = function MemberInfo_GetCustomAttributes(inherit) { | |
return System.Linq.Enumerable.ToArray(System.Attribute, this.attributes); | |
}; | |
$p.GetCustomAttributes$1 = function MemberInfo_GetCustomAttributes(attributeType, inherit) { | |
return System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Where(System.Object, | |
this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this))); | |
}; | |
$p.IsDefined = function MemberInfo_IsDefined(attributeType, inherit) { | |
return System.Linq.Enumerable.Any$1(System.Object, this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this)); | |
}; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1 = $p.GetCustomAttributes$1; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes = $p.GetCustomAttributes; | |
$p.System$Reflection$ICustomAttributeProvider$IsDefined = $p.IsDefined; | |
}); | |
System.Reflection.MethodBase = $d.declare("System.Reflection.MethodBase", System.Reflection.MemberInfo, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [129, [["methodAttributes", System.Reflection.MethodAttributes, 36], ["parameters", $d.arrayType(System.Reflection.ParameterInfo), 35]], [["get_Attributes", p.get_Attributes, 6], ["get_CallingConvention", p.get_CallingConvention, 6], ["get_IsGenericMethodDefinition", p.get_IsGenericMethodDefinition, 6], ["get_ContainsGenericParameters", p.get_ContainsGenericParameters, 6], ["get_IsGenericMethod", p.get_IsGenericMethod, 6], ["get_IsSecurityCritical", p.get_IsSecurityCritical, 6], ["get_IsSecuritySafeCritical", p.get_IsSecuritySafeCritical, 6], ["get_IsSecurityTransparent", p.get_IsSecurityTransparent, 6], ["get_IsPublic", p.get_IsPublic, 6], ["get_IsPrivate", p.get_IsPrivate, 6], ["get_IsFamily", p.get_IsFamily, 6], ["get_IsAssembly", p.get_IsAssembly, 6], ["get_IsFamilyAndAssembly", p.get_IsFamilyAndAssembly, 6], ["get_IsFamilyOrAssembly", p.get_IsFamilyOrAssembly, 6], ["get_IsStatic", p.get_IsStatic, 6], ["get_IsFinal", p.get_IsFinal, 6], ["get_IsVirtual", p.get_IsVirtual, 6], ["get_IsHideBySig", p.get_IsHideBySig, 6], ["get_IsAbstract", p.get_IsAbstract, 6], ["get_IsSpecialName", p.get_IsSpecialName, 6], ["get_IsConstructor", p.get_IsConstructor, 6], ["get_FullName", p.get_FullName, 3], ["GetCurrentMethod", t.GetCurrentMethod, 22], ["GetParameters", p.GetParameters, 6], ["Invoke", null, 6], ["GetGenericArguments", p.GetGenericArguments, 6], ["Invoke", p.Invoke, 6]], [["ctor", t.ctor, 4]], [["Attributes", System.Reflection.MethodAttributes, 0], ["CallingConvention", System.Reflection.CallingConventions, 1], ["IsGenericMethodDefinition", 39, 2], ["ContainsGenericParameters", 39, 3], ["IsGenericMethod", 39, 4], ["IsSecurityCritical", 39, 5], ["IsSecuritySafeCritical", 39, 6], ["IsSecurityTransparent", 39, 7], ["IsPublic", 39, 8], ["IsPrivate", 39, 9], ["IsFamily", 39, 10], ["IsAssembly", 39, 11], ["IsFamilyAndAssembly", 39, 12], ["IsFamilyOrAssembly", 39, 13], ["IsStatic", 39, 14], ["IsFinal", 39, 15], ["IsVirtual", 39, 16], ["IsHideBySig", 39, 17], ["IsAbstract", 39, 18], ["IsSpecialName", 39, 19], ["IsConstructor", 39, 20], ["FullName", 20, 21]]]; }; | |
$t.$ator = function() { | |
this.methodAttributes = 0; | |
this.parameters = null; | |
}; | |
$t.ctor = function MethodBase(name, methodAttributes, parameters, attributes) { | |
$t.$baseType.ctor.call(this, name, attributes); | |
this.methodAttributes = methodAttributes; | |
System.Type.TryConstruct(parameters, System.Reflection.ParameterInfo.Create); | |
this.parameters = (parameters != null) ? $d.array(System.Reflection.ParameterInfo, parameters) : System.Reflection.ParameterInfo().EmptyParameters; | |
for (var $i = 0, $length = this.parameters.length; $i != $length; $i++) { | |
var parameter = this.parameters[$i]; | |
parameter.containingMember = this; | |
} | |
}; | |
$p.get_Attributes = function MethodBase_get_Attributes() { | |
return this.methodAttributes; | |
}; | |
$p.get_CallingConvention = function MethodBase_get_CallingConvention() { | |
return 1; | |
}; | |
$p.get_IsGenericMethodDefinition = function MethodBase_get_IsGenericMethodDefinition() { | |
return false; | |
}; | |
$p.get_ContainsGenericParameters = function MethodBase_get_ContainsGenericParameters() { | |
return false; | |
}; | |
$p.get_IsGenericMethod = function MethodBase_get_IsGenericMethod() { | |
return false; | |
}; | |
$p.get_IsSecurityCritical = function MethodBase_get_IsSecurityCritical() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_IsSecuritySafeCritical = function MethodBase_get_IsSecuritySafeCritical() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_IsSecurityTransparent = function MethodBase_get_IsSecurityTransparent() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_IsPublic = function MethodBase_get_IsPublic() { | |
return (this.get_Attributes() & 7) == 6; | |
}; | |
$p.get_IsPrivate = function MethodBase_get_IsPrivate() { | |
return (this.get_Attributes() & 7) == 1; | |
}; | |
$p.get_IsFamily = function MethodBase_get_IsFamily() { | |
return (this.get_Attributes() & 7) == 4; | |
}; | |
$p.get_IsAssembly = function MethodBase_get_IsAssembly() { | |
return (this.get_Attributes() & 7) == 3; | |
}; | |
$p.get_IsFamilyAndAssembly = function MethodBase_get_IsFamilyAndAssembly() { | |
return (this.get_Attributes() & 7) == 2; | |
}; | |
$p.get_IsFamilyOrAssembly = function MethodBase_get_IsFamilyOrAssembly() { | |
return (this.get_Attributes() & 7) == 5; | |
}; | |
$p.get_IsStatic = function MethodBase_get_IsStatic() { | |
return (this.get_Attributes() & 16) != 0; | |
}; | |
$p.get_IsFinal = function MethodBase_get_IsFinal() { | |
return (this.get_Attributes() & 32) != 0; | |
}; | |
$p.get_IsVirtual = function MethodBase_get_IsVirtual() { | |
return (this.get_Attributes() & 64) != 0; | |
}; | |
$p.get_IsHideBySig = function MethodBase_get_IsHideBySig() { | |
return (this.get_Attributes() & 128) != 0; | |
}; | |
$p.get_IsAbstract = function MethodBase_get_IsAbstract() { | |
return (this.get_Attributes() & 1024) != 0; | |
}; | |
$p.get_IsSpecialName = function MethodBase_get_IsSpecialName() { | |
return (this.get_Attributes() & 2048) != 0; | |
}; | |
$p.get_IsConstructor = function MethodBase_get_IsConstructor() { | |
if ($d.is(this, System.Reflection.ConstructorInfo) && !this.get_IsStatic()) | |
return (this.get_Attributes() & 4096) == 4096; | |
else | |
return false; | |
}; | |
$p.get_FullName = function MethodBase_get_FullName() { | |
return this.get_DeclaringType().get_FullName() + "." + this.get_Name(); | |
}; | |
$t.GetCurrentMethod = function MethodBase_GetCurrentMethod() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetParameters = function MethodBase_GetParameters() { | |
return System.Linq.Enumerable.ToArray(System.Reflection.ParameterInfo, this.parameters); | |
}; | |
$p.GetGenericArguments = function MethodBase_GetGenericArguments() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.Invoke = function MethodBase_Invoke(obj, parameters) { | |
return this.Invoke$1(obj, 0, null, parameters, null); | |
}; | |
}); | |
System.Reflection.ConstructorInfo = $d.declare("System.Reflection.ConstructorInfo", System.Reflection.MethodBase, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, [["ConstructorName", 20, 54], ["TypeConstructorName", 20, 54]], [["get_MemberType", p.get_MemberType, 6], ["Create", t.Create, 19], ["Invoke", p.Invoke$3, 6], ["Invoke", p.Invoke$1, 6], ["Invoke", p.Invoke$2, 6]], [["ctor", t.ctor, 6]], [["MemberType", System.Reflection.MemberTypes, 0]]]; }; | |
$t.cctor = function() { | |
$t.ConstructorName = ".ctor"; | |
$t.TypeConstructorName = ".cctor"; | |
}; | |
$t.$ator = function() { | |
this.jsConstructor = null; | |
}; | |
$p.get_MemberType = function ConstructorInfo_get_MemberType() { | |
return 1; | |
}; | |
$t.ctor = function ConstructorInfo(name, jsConstructor, methodAttributes, parameters, attributes) { | |
$t.$baseType.ctor.call(this, name, methodAttributes, parameters, attributes); | |
this.jsConstructor = jsConstructor; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function ConstructorInfo_Create(args) { | |
return new System.Reflection.ConstructorInfo.ctor(args[0], args[1], args[2], args[3], args[4]); | |
}; | |
$p.Invoke$3 = function ConstructorInfo_Invoke(invokeAttr, binder, parameters, culture) { | |
var actualCount = (parameters != null) ? parameters.length : 0; | |
if (this.parameters.length != actualCount) | |
throw new System.Exception.ctor$1(System.Environment.GetResourceString("Arg_ParmCnt")); | |
if (actualCount == 0) | |
return new this.jsConstructor(); | |
var instance = Object.create(this.jsConstructor.prototype); | |
this.jsConstructor.apply(instance, parameters); | |
return instance; | |
}; | |
$p.Invoke$1 = function ConstructorInfo_Invoke(obj, invokeAttr, binder, parameters, culture) { | |
return this.Invoke$3(invokeAttr, binder, parameters, culture); | |
}; | |
$p.Invoke$2 = function ConstructorInfo_Invoke(parameters) { | |
return this.Invoke$3(0, null, parameters, null); | |
}; | |
}); | |
System.Reflection.EventInfo = $d.declare("System.Reflection.EventInfo", System.Reflection.MemberInfo, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["get_MemberType", p.get_MemberType, 6], ["get_AddMethod", p.get_AddMethod, 6], ["get_RemoveMethod", p.get_RemoveMethod, 6], ["get_EventHandlerType", p.get_EventHandlerType, 6], ["GetAddMethod", p.GetAddMethod$1, 6], ["GetRemoveMethod", p.GetRemoveMethod$1, 6], ["GetAddMethod", p.GetAddMethod, 6], ["GetRemoveMethod", p.GetRemoveMethod, 6], ["AddEventHandler", p.AddEventHandler, 6], ["RemoveEventHandler", p.RemoveEventHandler, 6]], [["ctor", t.ctor, 6]], [["MemberType", System.Reflection.MemberTypes, 1], ["AddMethod", System.Reflection.MethodInfo, 2], ["RemoveMethod", System.Reflection.MethodInfo, 3], ["EventHandlerType", 27, 4]]]; }; | |
$t.$ator = function() { | |
this.eventType = null; | |
this.addMethod = null; | |
this.removeMethod = null; | |
}; | |
$t.ctor = function EventInfo(name, eventType, addMethod, removeMethod, attributes) { | |
$t.$baseType.ctor.call(this, name, attributes); | |
this.eventType = eventType; | |
this.addMethod = Array.isArray(addMethod) ? System.Reflection.MethodInfo.Create(addMethod) : addMethod || null; | |
this.removeMethod = Array.isArray(removeMethod) ? System.Reflection.MethodInfo.Create(removeMethod) : removeMethod || null; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function EventInfo_Create(methods, args) { | |
return new System.Reflection.EventInfo.ctor(args[0], args[1], args[2] != null ? methods[args[2]] : null, | |
args[3] != null ? methods[args[3]] : null, args[4]); | |
}; | |
$p.get_MemberType = function EventInfo_get_MemberType() { | |
return 2; | |
}; | |
$p.get_AddMethod = function EventInfo_get_AddMethod() { | |
return this.addMethod; | |
}; | |
$p.get_RemoveMethod = function EventInfo_get_RemoveMethod() { | |
return this.removeMethod; | |
}; | |
$p.get_EventHandlerType = function EventInfo_get_EventHandlerType() { | |
return $d.typeOf(this.eventType); | |
}; | |
$p.GetAddMethod$1 = function EventInfo_GetAddMethod(nonPublic) { | |
return this.addMethod == null || this.addMethod.get_IsPublic() || nonPublic ? this.addMethod : null; | |
}; | |
$p.GetRemoveMethod$1 = function EventInfo_GetRemoveMethod(nonPublic) { | |
return this.removeMethod == null || this.removeMethod.get_IsPublic() || nonPublic ? this.removeMethod : null; | |
}; | |
$p.GetAddMethod = function EventInfo_GetAddMethod() { | |
return this.GetAddMethod$1(false); | |
}; | |
$p.GetRemoveMethod = function EventInfo_GetRemoveMethod() { | |
return this.GetRemoveMethod$1(false); | |
}; | |
$p.AddEventHandler = function EventInfo_AddEventHandler(target, handler) { | |
var addMethod = this.GetAddMethod(); | |
if (addMethod == null) | |
throw new System.InvalidOperationException.ctor$1("InvalidOperation_NoPublicAddMethod"); | |
addMethod.Invoke(target, $d.array(System.Delegate, [handler])); | |
}; | |
$p.RemoveEventHandler = function EventInfo_RemoveEventHandler(target, handler) { | |
var removeMethod = this.GetRemoveMethod(); | |
if (removeMethod == null) | |
throw new System.InvalidOperationException.ctor$1("InvalidOperation_NoPublicRemoveMethod"); | |
removeMethod.Invoke(target, $d.array(System.Delegate, [handler])); | |
}; | |
}); | |
System.Reflection.FieldAttributes = $d.declareEnum("System.Reflection.FieldAttributes", 45, $asm, 289, ["PrivateScope", "Private", "FamANDAssem", "Assembly", "Family", "FamORAssem", "Public", "FieldAccessMask", "Static", "InitOnly", "Literal", "NotSerialized", "HasFieldRVA", "SpecialName", "RTSpecialName", "HasFieldMarshal", "PinvokeImpl", "HasDefault", "ReservedMask"], [0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x1000, 0x2000, 0x8000, 0x9500]); | |
System.Reflection.FieldInfo = $d.declare("System.Reflection.FieldInfo", System.Reflection.MemberInfo, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["get_MemberType", p.get_MemberType, 6], ["get_FieldType", p.get_FieldType, 6], ["get_Attributes", p.get_Attributes, 6], ["get_IsPublic", p.get_IsPublic, 6], ["get_IsPrivate", p.get_IsPrivate, 6], ["get_IsFamily", p.get_IsFamily, 6], ["get_IsAssembly", p.get_IsAssembly, 6], ["get_IsFamilyAndAssembly", p.get_IsFamilyAndAssembly, 6], ["get_IsFamilyOrAssembly", p.get_IsFamilyOrAssembly, 6], ["get_IsStatic", p.get_IsStatic, 6], ["get_IsInitOnly", p.get_IsInitOnly, 6], ["get_IsLiteral", p.get_IsLiteral, 6], ["get_IsNotSerialized", p.get_IsNotSerialized, 6], ["get_IsSpecialName", p.get_IsSpecialName, 6], ["get_IsPinvokeImpl", p.get_IsPinvokeImpl, 6], ["GetRequiredCustomModifiers", p.GetRequiredCustomModifiers, 6], ["GetOptionalCustomModifiers", p.GetOptionalCustomModifiers, 6], ["GetValue", p.GetValue, 6], ["SetValue", p.SetValue$1, 6], ["GetRawConstantValue", p.GetRawConstantValue, 6], ["SetValue", p.SetValue, 6]], [["ctor", t.ctor, 6]], [["MemberType", System.Reflection.MemberTypes, 1], ["FieldType", 27, 2], ["Attributes", System.Reflection.FieldAttributes, 3], ["IsPublic", 39, 4], ["IsPrivate", 39, 5], ["IsFamily", 39, 6], ["IsAssembly", 39, 7], ["IsFamilyAndAssembly", 39, 8], ["IsFamilyOrAssembly", 39, 9], ["IsStatic", 39, 10], ["IsInitOnly", 39, 11], ["IsLiteral", 39, 12], ["IsNotSerialized", 39, 13], ["IsSpecialName", 39, 14], ["IsPinvokeImpl", 39, 15]]]; }; | |
$t.$ator = function() { | |
this.fieldType = null; | |
this.fieldAttributes = 0; | |
this.constantValue = null; | |
}; | |
$t.ctor = function FieldInfo(name, fieldType, fieldAttributes, constantValue, attributes) { | |
$t.$baseType.ctor.call(this, name, attributes); | |
this.fieldType = $d.tryDecodeTypeFunc(fieldType); | |
this.fieldAttributes = fieldAttributes; | |
this.constantValue = constantValue || null; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function FieldInfo_Create(args) { | |
return new System.Reflection.FieldInfo.ctor(args[0], args[1], args[2], args[3], args[4]); | |
}; | |
$p.get_MemberType = function FieldInfo_get_MemberType() { | |
return 4; | |
}; | |
$p.get_FieldType = function FieldInfo_get_FieldType() { | |
return $d.typeOf(this.fieldType); | |
}; | |
$p.get_Attributes = function FieldInfo_get_Attributes() { | |
return this.fieldAttributes; | |
}; | |
$p.get_IsPublic = function FieldInfo_get_IsPublic() { | |
return (this.get_Attributes() & 7) == 6; | |
}; | |
$p.get_IsPrivate = function FieldInfo_get_IsPrivate() { | |
return (this.get_Attributes() & 7) == 1; | |
}; | |
$p.get_IsFamily = function FieldInfo_get_IsFamily() { | |
return (this.get_Attributes() & 7) == 4; | |
}; | |
$p.get_IsAssembly = function FieldInfo_get_IsAssembly() { | |
return (this.get_Attributes() & 7) == 3; | |
}; | |
$p.get_IsFamilyAndAssembly = function FieldInfo_get_IsFamilyAndAssembly() { | |
return (this.get_Attributes() & 7) == 2; | |
}; | |
$p.get_IsFamilyOrAssembly = function FieldInfo_get_IsFamilyOrAssembly() { | |
return (this.get_Attributes() & 7) == 5; | |
}; | |
$p.get_IsStatic = function FieldInfo_get_IsStatic() { | |
return (this.get_Attributes() & 16) != 0; | |
}; | |
$p.get_IsInitOnly = function FieldInfo_get_IsInitOnly() { | |
return (this.get_Attributes() & 32) != 0; | |
}; | |
$p.get_IsLiteral = function FieldInfo_get_IsLiteral() { | |
return (this.get_Attributes() & 64) != 0; | |
}; | |
$p.get_IsNotSerialized = function FieldInfo_get_IsNotSerialized() { | |
return (this.get_Attributes() & 128) != 0; | |
}; | |
$p.get_IsSpecialName = function FieldInfo_get_IsSpecialName() { | |
return (this.get_Attributes() & 512) != 0; | |
}; | |
$p.get_IsPinvokeImpl = function FieldInfo_get_IsPinvokeImpl() { | |
return (this.get_Attributes() & 8192) != 0; | |
}; | |
$p.GetRequiredCustomModifiers = function FieldInfo_GetRequiredCustomModifiers() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetOptionalCustomModifiers = function FieldInfo_GetOptionalCustomModifiers() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetValue = function FieldInfo_GetValue(obj) { | |
if (this.get_IsStatic()) | |
return this.declaringType[this.get_Name()]; | |
else | |
return obj[this.get_Name()]; | |
}; | |
$p.SetValue$1 = function FieldInfo_SetValue(obj, value, invokeAttr, binder, culture) { | |
if (this.get_IsStatic()) | |
this.declaringType[this.get_Name()] = value; | |
else | |
obj[this.get_Name()] = value; | |
}; | |
$p.GetRawConstantValue = function FieldInfo_GetRawConstantValue() { | |
return this.constantValue; | |
}; | |
$p.SetValue = function FieldInfo_SetValue(obj, value) { | |
this.SetValue$1(obj, value, 0, System.Type().DefaultBinder, null); | |
}; | |
}); | |
System.Reflection.MemberTypes = $d.declareEnum("System.Reflection.MemberTypes", 45, $asm, 289, ["Constructor", "Event", "Field", "Method", "Property", "TypeInfo", "Custom", "NestedType", "All"], [0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0xBF]); | |
System.Reflection.MethodAttributes = $d.declareEnum("System.Reflection.MethodAttributes", 45, $asm, 289, ["PrivateScope", "Private", "FamANDAssem", "Assembly", "Family", "FamORAssem", "Public", "MemberAccessMask", "UnmanagedExport", "Static", "Final", "Virtual", "HideBySig", "VtableLayoutMask", "CheckAccessOnOverride", "Abstract", "SpecialName", "RTSpecialName", "PinvokeImpl", "HasSecurity", "RequireSecObject", "ReservedMask"], [0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0xD000]); | |
System.Reflection.MethodInfo = $d.declare("System.Reflection.MethodInfo", System.Reflection.MethodBase, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["get_MemberType", p.get_MemberType, 6], ["get_IsGenericMethod", p.get_IsGenericMethod, 6], ["get_IsGenericMethodDefinition", p.get_IsGenericMethodDefinition, 6], ["get_ReturnType", p.get_ReturnType, 6], ["get_ReturnTypeCustomAttributes", p.get_ReturnTypeCustomAttributes, 6], ["GetBaseDefinition", p.GetBaseDefinition, 6], ["GetGenericArguments", p.GetGenericArguments, 6], ["GetGenericMethodDefinition", p.GetGenericMethodDefinition, 6], ["MakeGenericMethod", p.MakeGenericMethod, 6], ["CreateDelegate", p.CreateDelegate, 6], ["CreateDelegate", p.CreateDelegate$1, 6], ["Invoke", p.Invoke$1, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["MemberType", System.Reflection.MemberTypes, 1], ["IsGenericMethod", 39, 2], ["IsGenericMethodDefinition", 39, 3], ["ReturnType", 27, 4], ["ReturnTypeCustomAttributes", System.Reflection.ICustomAttributeProvider, 5]]]; }; | |
$t.$ator = function() { | |
this.jsMethod = null; | |
this.returnType = null; | |
this.typeArguments = null; | |
this.constructedMethods = null; | |
}; | |
$t.ctor = function MethodInfo(name, jsMethod, methodAttributes, returnType, parameters, attributes, typeArguments) { | |
$t.$baseType.ctor.call(this, name, methodAttributes, parameters, attributes); | |
this.jsMethod = jsMethod; | |
this.returnType = returnType ? $d.tryDecodeTypeFunc(returnType) : System.Void; | |
this.typeArguments = typeArguments; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function MethodInfo_Create(args) { | |
return new System.Reflection.MethodInfo.ctor(args[0], args[1], args[2], args[3], args[4], args[5], | |
args[6]); | |
}; | |
$p.get_MemberType = function MethodInfo_get_MemberType() { | |
return 8; | |
}; | |
$p.get_IsGenericMethod = function MethodInfo_get_IsGenericMethod() { | |
return (this.typeArguments != null && this.typeArguments.length > 0); | |
}; | |
$p.get_IsGenericMethodDefinition = function MethodInfo_get_IsGenericMethodDefinition() { | |
return (this.typeArguments != null && this.typeArguments.length > 0 && this.typeArguments[0].$typeKind == 67); | |
}; | |
$p.get_ReturnType = function MethodInfo_get_ReturnType() { | |
return $d.typeOf(this.returnType); | |
}; | |
$p.get_ReturnTypeCustomAttributes = function MethodInfo_get_ReturnTypeCustomAttributes() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetBaseDefinition = function MethodInfo_GetBaseDefinition() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.GetGenericArguments = function MethodInfo_GetGenericArguments() { | |
return $d.typesOf(this.typeArguments); | |
}; | |
$p.GetGenericMethodDefinition = function MethodInfo_GetGenericMethodDefinition() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.MakeGenericMethod = function MethodInfo_MakeGenericMethod(typeArguments) { | |
if (!this.get_IsGenericMethodDefinition()) | |
throw new System.InvalidOperationException.ctor$1("IsGenericMethodDefinition must be true"); | |
if (this.constructedMethods == null) | |
this.constructedMethods = new Object(); | |
var keyString = typeArguments.map(function(x) { | |
return x.get_FullName(); | |
}).join(", "); | |
var result = this.constructedMethods[keyString]; | |
if (result == null) { | |
var typeArgumentsFuncs = typeArguments.map(function(x) { | |
return x.self; | |
}); | |
var newReturnType = this.returnType; | |
var newParameters = this.GetParameters(); | |
result = new System.Reflection.MethodInfo.ctor(this.name, this.jsMethod, this.methodAttributes, | |
newReturnType, newParameters, this.attributes, typeArgumentsFuncs); | |
result.declaringType = this.declaringType; | |
this.constructedMethods[keyString] = result; | |
} | |
return result; | |
}; | |
$p.CreateDelegate = function MethodInfo_CreateDelegate(delegateType) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.CreateDelegate$1 = function MethodInfo_CreateDelegate(delegateType, target) { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.Invoke$1 = function MethodInfo_Invoke(obj, invokeAttr, binder, parameters, culture) { | |
if (this.get_IsStatic() && obj != null) | |
throw new System.InvalidOperationException.ctor$1("Static methods cannot have a target"); | |
if (!this.get_IsStatic() && obj == null) | |
throw new System.InvalidOperationException.ctor$1("Instance methods must have a target"); | |
var args = this.typeArguments ? (parameters ? this.typeArguments.concat(parameters) : this.typeArguments) : parameters; | |
return this.jsMethod.apply(obj, args); | |
}; | |
$p.ToString = function MethodInfo_ToString() { | |
var s = this.parameters.map(function(x) { | |
return x.get_ParameterType().get_FullName() + " " + x.get_Name(); | |
}).join(", "); | |
var t = String.Empty; | |
if (this.typeArguments) { | |
t = "<" + this.typeArguments.map(function(x) { | |
return x.$typeName; | |
}).join(", ") + ">"; | |
} | |
return this.returnType.toString() + " " + this.get_DeclaringType().get_FullName() + "." + this.name + t + "(" + s + ")"; | |
}; | |
}); | |
System.Reflection.ParameterAttributes = $d.declareEnum("System.Reflection.ParameterAttributes", 45, $asm, 289, ["None", "In", "Out", "Lcid", "Retval", "Optional", "HasDefault", "HasFieldMarshal", "Reserved3", "Reserved4", "ReservedMask"], [0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x1000, 0x2000, 0x4000, 0x8000, 0xF000]); | |
System.Reflection.ParameterInfo = $d.declare("System.Reflection.ParameterInfo", System.Object, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, [["EmptyParameters", $d.arrayType(System.Reflection.ParameterInfo), 51], ["containingMember", System.Reflection.MemberInfo, 3]], [["Create", t.Create, 19], ["get_ParameterType", p.get_ParameterType, 6], ["get_Name", p.get_Name, 6], ["get_HasDefaultValue", p.get_HasDefaultValue, 6], ["get_DefaultValue", p.get_DefaultValue, 6], ["get_RawDefaultValue", p.get_RawDefaultValue, 6], ["get_Position", p.get_Position, 6], ["get_Attributes", p.get_Attributes, 6], ["get_Member", p.get_Member, 6], ["get_IsIn", p.get_IsIn, 6], ["get_IsOut", p.get_IsOut, 6], ["get_IsLcid", p.get_IsLcid, 6], ["get_IsRetval", p.get_IsRetval, 6], ["get_IsOptional", p.get_IsOptional, 6], ["ToString", p.ToString, 6], ["GetCustomAttributes", p.GetCustomAttributes, 6], ["GetCustomAttributes", p.GetCustomAttributes$1, 6], ["IsDefined", p.IsDefined, 6]], [["ctor", t.ctor, 6]], [["ParameterType", 27, 1], ["Name", 20, 2], ["HasDefaultValue", 39, 3], ["DefaultValue", 1, 4], ["RawDefaultValue", 1, 5], ["Position", 45, 6], ["Attributes", System.Reflection.ParameterAttributes, 7], ["Member", System.Reflection.MemberInfo, 8], ["IsIn", 39, 9], ["IsOut", 39, 10], ["IsLcid", 39, 11], ["IsRetval", 39, 12], ["IsOptional", 39, 13]]]; }; | |
$t.cctor = function() { | |
$t.EmptyParameters = $d.array(System.Reflection.ParameterInfo, 0); | |
}; | |
$t.$ator = function() { | |
this.name = null; | |
this.type = null; | |
this.position = 0; | |
this.parameterAttributes = 0; | |
this.defaultValue = null; | |
this.attributes = null; | |
this.containingMember = null; | |
}; | |
$t.ctor = function ParameterInfo(name, type, position, parameterAttributes, defaultValue, attributes) { | |
$t.$baseType.ctor.call(this); | |
this.name = name; | |
this.type = $d.tryDecodeTypeFunc(type); | |
this.position = position; | |
this.parameterAttributes = $d.ncl(parameterAttributes, 0); | |
this.defaultValue = defaultValue || null; | |
this.attributes = (attributes != null) ? $d.array(System.Attribute, attributes) : System.Attribute().EmptyAttributes; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function ParameterInfo_Create(args) { | |
return new System.Reflection.ParameterInfo.ctor(args[0], args[1], args[2], args[3], args[4], | |
args[5]); | |
}; | |
$p.get_ParameterType = function ParameterInfo_get_ParameterType() { | |
return $d.typeOf(this.type); | |
}; | |
$p.get_Name = function ParameterInfo_get_Name() { | |
return this.name; | |
}; | |
$p.get_HasDefaultValue = function ParameterInfo_get_HasDefaultValue() { | |
return this.get_IsOptional(); | |
}; | |
$p.get_DefaultValue = function ParameterInfo_get_DefaultValue() { | |
return this.defaultValue; | |
}; | |
$p.get_RawDefaultValue = function ParameterInfo_get_RawDefaultValue() { | |
return (this.get_Attributes() & 4096) != 0; | |
}; | |
$p.get_Position = function ParameterInfo_get_Position() { | |
return this.position; | |
}; | |
$p.get_Attributes = function ParameterInfo_get_Attributes() { | |
return this.parameterAttributes; | |
}; | |
$p.get_Member = function ParameterInfo_get_Member() { | |
return this.containingMember; | |
}; | |
$p.get_IsIn = function ParameterInfo_get_IsIn() { | |
return (this.get_Attributes() & 1) != 0; | |
}; | |
$p.get_IsOut = function ParameterInfo_get_IsOut() { | |
return (this.get_Attributes() & 2) != 0; | |
}; | |
$p.get_IsLcid = function ParameterInfo_get_IsLcid() { | |
return (this.get_Attributes() & 4) != 0; | |
}; | |
$p.get_IsRetval = function ParameterInfo_get_IsRetval() { | |
return (this.get_Attributes() & 8) != 0; | |
}; | |
$p.get_IsOptional = function ParameterInfo_get_IsOptional() { | |
return (this.get_Attributes() & 16) != 0; | |
}; | |
$p.ToString = function ParameterInfo_ToString() { | |
return $d.toString(this.get_ParameterType()) + " " + this.get_Name(); | |
}; | |
$p.GetCustomAttributes = function ParameterInfo_GetCustomAttributes(inherit) { | |
return System.Linq.Enumerable.ToArray(System.Attribute, this.attributes); | |
}; | |
$p.GetCustomAttributes$1 = function ParameterInfo_GetCustomAttributes(attributeType, inherit) { | |
return System.Linq.Enumerable.ToArray(System.Object, System.Linq.Enumerable.Where(System.Object, | |
this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this))); | |
}; | |
$p.IsDefined = function ParameterInfo_IsDefined(attributeType, inherit) { | |
return System.Linq.Enumerable.Any$1(System.Object, this.GetCustomAttributes(inherit), $d.delegate(function(x) { | |
return attributeType.IsInstanceOfType(x); | |
}, this)); | |
}; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1 = $p.GetCustomAttributes$1; | |
$p.System$Reflection$ICustomAttributeProvider$GetCustomAttributes = $p.GetCustomAttributes; | |
$p.System$Reflection$ICustomAttributeProvider$IsDefined = $p.IsDefined; | |
}); | |
System.Reflection.ParameterModifier = $d.declare("System.Reflection.ParameterModifier", null, 62, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_IsByRefArray", p.get_IsByRefArray, 3], ["get_Item", p.get_Item, 6], ["set_Item", p.set_Item, 6]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6]], [["IsByRefArray", 167, 0], ["this[]", 39, 1, 2, [["index", 45, 0]]]]]; }; | |
$t.ctor = function ParameterModifier() { | |
this._byRef = null; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_IsByRefArray = function ParameterModifier_get_IsByRefArray() { | |
return this._byRef; | |
}; | |
$p.get_Item = function ParameterModifier_get_Item(index) { | |
return this._byRef[index]; | |
}; | |
$p.set_Item = function ParameterModifier_set_Item(index, value) { | |
this._byRef[index] = value; | |
}; | |
$t.ctor$1 = function ParameterModifier(parameterCount) { | |
if (parameterCount <= 0) | |
throw new System.ArgumentException.ctor$1("Arg_ParmArraySize"); | |
this._byRef = $d.array(Boolean, parameterCount); | |
}; | |
$t.ctor$1.prototype = $p; | |
}); | |
System.Reflection.PropertyAttributes = $d.declareEnum("System.Reflection.PropertyAttributes", 45, $asm, 289, ["None", "SpecialName", "RTSpecialName", "HasDefault", "Reserved2", "Reserved3", "Reserved4", "ReservedMask"], [0, 0x200, 0x400, 0x1000, 0x2000, 0x4000, 0x8000, 0xF400]); | |
System.Reflection.PropertyInfo = $d.declare("System.Reflection.PropertyInfo", System.Reflection.MemberInfo, 0, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 19], ["get_MemberType", p.get_MemberType, 6], ["get_PropertyType", p.get_PropertyType, 6], ["get_Attributes", p.get_Attributes, 6], ["get_CanRead", p.get_CanRead, 6], ["get_CanWrite", p.get_CanWrite, 6], ["get_GetMethod", p.get_GetMethod, 6], ["get_SetMethod", p.get_SetMethod, 6], ["get_IsSpecialName", p.get_IsSpecialName, 6], ["SetValue", p.SetValue$2, 6], ["GetAccessors", p.GetAccessors$1, 6], ["GetGetMethod", p.GetGetMethod$1, 6], ["GetSetMethod", p.GetSetMethod$1, 6], ["GetIndexParameters", p.GetIndexParameters, 6], ["GetValue", p.GetValue, 6], ["GetValue", p.GetValue$1, 6], ["GetValue", p.GetValue$2, 6], ["SetValue", p.SetValue, 6], ["SetValue", p.SetValue$1, 6], ["GetRequiredCustomModifiers", p.GetRequiredCustomModifiers, 6], ["GetOptionalCustomModifiers", p.GetOptionalCustomModifiers, 6], ["GetAccessors", p.GetAccessors, 6], ["GetGetMethod", p.GetGetMethod, 6], ["GetSetMethod", p.GetSetMethod, 6]], [["ctor", t.ctor, 4]], [["MemberType", System.Reflection.MemberTypes, 1], ["PropertyType", 27, 2], ["Attributes", System.Reflection.PropertyAttributes, 3], ["CanRead", 39, 4], ["CanWrite", 39, 5], ["GetMethod", System.Reflection.MethodInfo, 6], ["SetMethod", System.Reflection.MethodInfo, 7], ["IsSpecialName", 39, 8]]]; }; | |
$t.$ator = function() { | |
this.propertyType = null; | |
this.getMethod = null; | |
this.setMethod = null; | |
this.indexParameters = null; | |
}; | |
$t.ctor = function PropertyInfo(name, propertyType, getMethod, setMethod, indexParameters, attributes) { | |
$t.$baseType.ctor.call(this, name, attributes); | |
this.propertyType = $d.tryDecodeTypeFunc(propertyType); | |
this.getMethod = Array.isArray(getMethod) ? System.Reflection.MethodInfo.Create(getMethod) : getMethod || null; | |
this.setMethod = Array.isArray(setMethod) ? System.Reflection.MethodInfo.Create(setMethod) : setMethod || null; | |
this.indexParameters = (indexParameters != null) ? $d.array(System.Reflection.ParameterInfo, | |
indexParameters) : System.Reflection.ParameterInfo().EmptyParameters; | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function PropertyInfo_Create(methods, args) { | |
return new System.Reflection.PropertyInfo.ctor(args[0], args[1], args[2] != null ? methods[args[2]] : null, | |
args[3] != null ? methods[args[3]] : null, args[4], args[5]); | |
}; | |
$p.get_MemberType = function PropertyInfo_get_MemberType() { | |
return 16; | |
}; | |
$p.get_PropertyType = function PropertyInfo_get_PropertyType() { | |
return $d.typeOf(this.propertyType); | |
}; | |
$p.get_Attributes = function PropertyInfo_get_Attributes() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.get_CanRead = function PropertyInfo_get_CanRead() { | |
return this.getMethod != null; | |
}; | |
$p.get_CanWrite = function PropertyInfo_get_CanWrite() { | |
return this.setMethod != null; | |
}; | |
$p.get_GetMethod = function PropertyInfo_get_GetMethod() { | |
return this.GetGetMethod$1(true); | |
}; | |
$p.get_SetMethod = function PropertyInfo_get_SetMethod() { | |
return this.GetSetMethod$1(true); | |
}; | |
$p.get_IsSpecialName = function PropertyInfo_get_IsSpecialName() { | |
return (this.get_Attributes() & 512) != 0; | |
}; | |
$p.SetValue$2 = function PropertyInfo_SetValue(obj, value, invokeAttr, binder, index, culture) { | |
if (this.get_SetMethod() == null) | |
throw new System.InvalidOperationException.ctor$1("Property '" + this.get_DeclaringType().get_FullName() + "." + this.get_Name() + "' does not have a setter."); | |
var args = $d.array(System.Object, 1 + (index != null ? index.length : 0)); | |
args[0] = value; | |
for (var i = 1; i < args.length; i++) { | |
args[i] = index[i - 1]; | |
} | |
this.get_SetMethod().Invoke$1(obj, invokeAttr, binder, args, culture); | |
}; | |
$p.GetAccessors$1 = function PropertyInfo_GetAccessors(nonPublic) { | |
var methods = new (System.Collections.Generic.List$1(System.Reflection.MethodInfo).ctor)(); | |
if (this.getMethod != null) | |
methods.Add(this.getMethod); | |
if (this.setMethod != null) | |
methods.Add(this.setMethod); | |
return methods.ToArray(); | |
}; | |
$p.GetGetMethod$1 = function PropertyInfo_GetGetMethod(nonPublic) { | |
if (nonPublic || this.getMethod == null) | |
return this.getMethod; | |
else | |
return this.getMethod.get_IsPublic() ? this.getMethod : null; | |
}; | |
$p.GetSetMethod$1 = function PropertyInfo_GetSetMethod(nonPublic) { | |
if (nonPublic || this.setMethod == null) | |
return this.setMethod; | |
else | |
return this.setMethod.get_IsPublic() ? this.setMethod : null; | |
}; | |
$p.GetIndexParameters = function PropertyInfo_GetIndexParameters() { | |
return System.Linq.Enumerable.ToArray(System.Reflection.ParameterInfo, this.indexParameters); | |
}; | |
$p.GetValue = function PropertyInfo_GetValue(obj) { | |
return this.GetValue$1(obj, null); | |
}; | |
$p.GetValue$1 = function PropertyInfo_GetValue(obj, index) { | |
return this.GetValue$2(obj, 0, null, index, null); | |
}; | |
$p.GetValue$2 = function PropertyInfo_GetValue(obj, invokeAttr, binder, index, culture) { | |
return this.get_GetMethod().Invoke$1(obj, invokeAttr, binder, index, culture); | |
}; | |
$p.SetValue = function PropertyInfo_SetValue(obj, value) { | |
this.SetValue$1(obj, value, null); | |
}; | |
$p.SetValue$1 = function PropertyInfo_SetValue(obj, value, index) { | |
this.SetValue$2(obj, value, 0, null, index, null); | |
}; | |
$p.GetRequiredCustomModifiers = function PropertyInfo_GetRequiredCustomModifiers() { | |
return $d.array(System.Type, 0); | |
}; | |
$p.GetOptionalCustomModifiers = function PropertyInfo_GetOptionalCustomModifiers() { | |
return $d.array(System.Type, 0); | |
}; | |
$p.GetAccessors = function PropertyInfo_GetAccessors() { | |
return this.GetAccessors$1(false); | |
}; | |
$p.GetGetMethod = function PropertyInfo_GetGetMethod() { | |
return this.GetGetMethod$1(false); | |
}; | |
$p.GetSetMethod = function PropertyInfo_GetSetMethod() { | |
return this.GetSetMethod$1(false); | |
}; | |
}); | |
System.Reflection.TypeAttributes = $d.declareEnum("System.Reflection.TypeAttributes", 45, $asm, 289, ["NotPublic", "AutoLayout", "AnsiClass", "Class", "Public", "NestedPublic", "NestedPrivate", "NestedFamily", "NestedAssembly", "NestedFamANDAssem", "VisibilityMask", "NestedFamORAssem", "SequentialLayout", "ExplicitLayout", "LayoutMask", "Interface", "ClassSemanticsMask", "Abstract", "Sealed", "SpecialName", "RTSpecialName", "Import", "Serializable", "UnicodeClass", "AutoClass", "StringFormatMask", "CustomFormatClass", "HasSecurity", "ReservedMask", "BeforeFieldInit", "Unknown", "CustomFormatMask"], [0, 0, 0, 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x7, 0x8, 0x10, 0x18, 0x20, 0x20, 0x80, 0x100, 0x400, 0x800, 0x1000, 0x2000, 0x10000, 0x20000, 0x30000, 0x30000, 0x40000, 0x40800, 0x100000, 0x200000, 0xC00000]); | |
System.Resources.ResourceManager = $d.declare("System.Resources.ResourceManager", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["GetString", p.GetString, 6], ["GetObject", p.GetObject, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.$ator = function() { | |
this.m_Assembly = null; | |
this.m_Name = null; | |
}; | |
$t.ctor = function ResourceManager(name, assembly) { | |
$t.$baseType.ctor.call(this); | |
this.m_Assembly = assembly; | |
this.m_Name = name; | |
}; | |
$t.ctor.prototype = $p; | |
$p.GetString = function ResourceManager_GetString(name, cultureInfo) { | |
var result = this.m_Assembly.GetManifestResourceString(this.m_Name + "$" + name); | |
return result; | |
}; | |
$p.GetObject = function ResourceManager_GetObject(name, cultureInfo) { | |
var image = document.createElement("img"); | |
var data = this.m_Assembly.GetManifestResourceString(this.m_Name + "$" + name); | |
image.src = data; | |
var result = new System.Drawing.Bitmap.ctor(image); | |
return result; | |
}; | |
}); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore = $d.declare("System.Runtime.CompilerServices.AsyncMethodBuilderCore", null, 62, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, [["m_defaultContextAction", System.Action, 3], ["m_stateMachine", System.Runtime.CompilerServices.IAsyncStateMachine, 3]], [["Start", p.Start, 3], ["SetStateMachine", p.SetStateMachine, 6], ["GetCompletionAction", p.GetCompletionAction, 3], ["ThrowAsync", t.ThrowAsync, 19]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function AsyncMethodBuilderCore() { | |
this.m_defaultContextAction = null; | |
this.m_stateMachine = null; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Start = function AsyncMethodBuilderCore_Start(stateMachine) { | |
if (stateMachine == null) | |
throw new System.ArgumentNullException.ctor$1("stateMachine"); | |
stateMachine.System$Runtime$CompilerServices$IAsyncStateMachine$MoveNext(); | |
}; | |
$p.SetStateMachine = function AsyncMethodBuilderCore_SetStateMachine(stateMachine) { | |
if (stateMachine == null) | |
throw new System.ArgumentNullException.ctor$1("stateMachine"); | |
if (this.m_stateMachine != null) | |
throw new System.InvalidOperationException.ctor$1("AsyncMethodBuilder_InstanceNotInitialized"); | |
this.m_stateMachine = stateMachine; | |
}; | |
$p.GetCompletionAction = function AsyncMethodBuilderCore_GetCompletionAction(TMethodBuilder, TStateMachine, builder, stateMachine) { | |
if (this.m_stateMachine == null) { | |
this.m_stateMachine = stateMachine; | |
this.m_stateMachine.System$Runtime$CompilerServices$IAsyncStateMachine$SetStateMachine(this.m_stateMachine); | |
} | |
var action = $d.delegate(this.m_stateMachine.System$Runtime$CompilerServices$IAsyncStateMachine$MoveNext, | |
this.m_stateMachine); | |
return action; | |
}; | |
$t.ThrowAsync = function AsyncMethodBuilderCore_ThrowAsync(exception) { | |
var exceptionDispatchInfo = System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(exception); | |
exceptionDispatchInfo.Throw(); | |
}; | |
}); | |
System.Runtime.CompilerServices.IAsyncMethodBuilder = $d.declare("System.Runtime.CompilerServices.IAsyncMethodBuilder", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [160]; }; | |
}); | |
System.Runtime.CompilerServices.AsyncTaskMethodBuilder = $d.declare("System.Runtime.CompilerServices.AsyncTaskMethodBuilder", null, 62, $asm, function($t, $p) { | |
$t.$intfs = [System.Runtime.CompilerServices.IAsyncMethodBuilder]; | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Task", p.get_Task, 6], ["Create", t.Create, 22], ["Start", p.Start, 6], ["SetStateMachine", p.SetStateMachine, 6], ["AwaitOnCompleted", p.AwaitOnCompleted, 6], ["SetResult", p.SetResult, 6], ["SetException", p.SetException, 6], ["AwaitOnCompleted", p.AwaitOnCompleted$1, 6], ["AwaitUnsafeOnCompleted", p.AwaitUnsafeOnCompleted, 6]], [["ctor", t.ctor, 6]], [["Task", System.Threading.Tasks.Task, 0]]]; }; | |
$t.ctor = function AsyncTaskMethodBuilder() { | |
this.m_builder = new (System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(System.Runtime.InteropServices.VoidTaskResult).ctor)(); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Task = function AsyncTaskMethodBuilder_get_Task() { | |
return this.m_builder.get_Task(); | |
}; | |
$t.Create = function AsyncTaskMethodBuilder_Create() { | |
var result = new System.Runtime.CompilerServices.AsyncTaskMethodBuilder.ctor(); | |
result.m_builder = System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(System.Runtime.InteropServices.VoidTaskResult).Create(); | |
return result; | |
}; | |
$p.Start = function AsyncTaskMethodBuilder_Start(TStateMachine, stateMachine) { | |
this.m_builder.Start(TStateMachine, stateMachine); | |
}; | |
$p.SetStateMachine = function AsyncTaskMethodBuilder_SetStateMachine(stateMachine) { | |
this.m_builder.SetStateMachine(stateMachine); | |
}; | |
$p.AwaitOnCompleted = function AsyncTaskMethodBuilder_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
this.m_builder.AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine); | |
}; | |
$p.SetResult = function AsyncTaskMethodBuilder_SetResult() { | |
this.m_builder.SetResult(new System.Runtime.InteropServices.VoidTaskResult.ctor()); | |
}; | |
$p.SetException = function AsyncTaskMethodBuilder_SetException(exception) { | |
this.m_builder.SetException(exception); | |
}; | |
$p.AwaitOnCompleted$1 = function AsyncTaskMethodBuilder_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
this.m_builder.AwaitOnCompleted(TAwaiter, TStateMachine, awaiter.value, stateMachine.value); | |
}; | |
$p.AwaitUnsafeOnCompleted = function AsyncTaskMethodBuilder_AwaitUnsafeOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
this.m_builder.AwaitOnCompleted(TAwaiter, TStateMachine, awaiter.value, stateMachine.value); | |
}; | |
}); | |
System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1 = $d.declare("System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1", null, 318, $asm, function($t, $p, TResult) { | |
$t.$intfs = [System.Runtime.CompilerServices.IAsyncMethodBuilder]; | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Task", p.get_Task, 6], ["Create", t.Create, 22], ["Start", p.Start, 6], ["SetStateMachine", p.SetStateMachine, 6], ["AwaitOnCompleted", p.AwaitOnCompleted, 6], ["SetResult", p.SetResult, 6], ["SetResult", p.SetResult$1, 3], ["SetException", p.SetException, 6], ["AwaitOnCompleted", p.AwaitOnCompleted$1, 6], ["AwaitUnsafeOnCompleted", p.AwaitUnsafeOnCompleted, 6]], [["ctor", t.ctor, 6]], [["Task", System.Threading.Tasks.Task$1(TResult), 0]]]; }; | |
$t.ctor = function AsyncTaskMethodBuilder$1() { | |
this.m_coreState = new System.Runtime.CompilerServices.AsyncMethodBuilderCore.ctor(); | |
this.m_task = null; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Task = function AsyncTaskMethodBuilder$1_get_Task() { | |
var task = this.m_task; | |
if (task == null) | |
this.m_task = task = new (System.Threading.Tasks.Task$1(TResult).ctor)(); | |
return task; | |
}; | |
$t.Create = function AsyncTaskMethodBuilder$1_Create() { | |
var result = new (System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(TResult).ctor)(); | |
result.m_coreState = new System.Runtime.CompilerServices.AsyncMethodBuilderCore.ctor(); | |
return result; | |
}; | |
$p.Start = function AsyncTaskMethodBuilder$1_Start(TStateMachine, stateMachine) { | |
this.m_coreState.Start(stateMachine.value); | |
}; | |
$p.SetStateMachine = function AsyncTaskMethodBuilder$1_SetStateMachine(stateMachine) { | |
this.m_coreState.SetStateMachine(stateMachine); | |
}; | |
$p.AwaitOnCompleted = function AsyncTaskMethodBuilder$1_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
try { | |
var completionAction = this.m_coreState.GetCompletionAction(System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(TResult), | |
TStateMachine, this, stateMachine); | |
awaiter.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted(completionAction); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync($e); | |
} | |
}; | |
$p.SetResult = function AsyncTaskMethodBuilder$1_SetResult(result) { | |
var task = this.m_task; | |
if (task == null) | |
this.m_task = this.GetTaskForResult(result); | |
else | |
if (!task.TrySetResult(result)) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
$p.SetResult$1 = function AsyncTaskMethodBuilder$1_SetResult(completedTask) { | |
if (this.m_task == null) | |
this.m_task = completedTask; | |
else | |
this.SetResult($d.default(TResult)); | |
}; | |
$p.SetException = function AsyncTaskMethodBuilder$1_SetException(exception) { | |
if (exception == null) | |
throw new System.ArgumentNullException.ctor$1("exception"); | |
var task = this.get_Task(); | |
var canceledException = $d.as(exception, System.Runtime.CompilerServices.OperationCanceledException); | |
if (!(canceledException != null ? task.TrySetCanceled$1(canceledException.get_CancellationToken(), | |
canceledException) : task.TrySetException(exception))) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
$p.GetTaskForResult = function AsyncTaskMethodBuilder$1_GetTaskForResult(result) { | |
return new (System.Threading.Tasks.Task$1(TResult).ctor$1)(result); | |
}; | |
$p.AwaitOnCompleted$1 = function AsyncTaskMethodBuilder$1_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
try { | |
var completionAction = this.m_coreState.GetCompletionAction(System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(TResult), | |
TStateMachine, this, stateMachine.value); | |
awaiter.value.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted(completionAction); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync($e); | |
} | |
}; | |
$p.AwaitUnsafeOnCompleted = function AsyncTaskMethodBuilder$1_AwaitUnsafeOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
try { | |
var completionAction = this.m_coreState.GetCompletionAction(System.Runtime.CompilerServices.AsyncTaskMethodBuilder$1(TResult), | |
TStateMachine, this, stateMachine.value); | |
awaiter.value.System$Runtime$CompilerServices$ICriticalNotifyCompletion$UnsafeOnCompleted(completionAction); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync($e); | |
} | |
}; | |
}, ["TResult"]); | |
System.Runtime.CompilerServices.AsyncVoidMethodBuilder = $d.declare("System.Runtime.CompilerServices.AsyncVoidMethodBuilder", null, 62, $asm, function($t, $p) { | |
$t.$intfs = [System.Runtime.CompilerServices.IAsyncMethodBuilder]; | |
$t.$typeInfo = function(t, p) { return [257, null, [["Create", t.Create, 22], ["Start", p.Start, 6], ["SetStateMachine", p.SetStateMachine, 6], ["AwaitOnCompleted", p.AwaitOnCompleted, 6], ["AwaitOnCompleted", p.AwaitOnCompleted$1, 6], ["AwaitUnsafeOnCompleted", p.AwaitUnsafeOnCompleted, 6], ["SetResult", p.SetResult, 6], ["SetException", p.SetException, 6]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function AsyncVoidMethodBuilder() { | |
this.m_coreState = new System.Runtime.CompilerServices.AsyncMethodBuilderCore.ctor(); | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function AsyncVoidMethodBuilder_Create() { | |
var result = new System.Runtime.CompilerServices.AsyncVoidMethodBuilder.ctor(); | |
result.m_coreState = new System.Runtime.CompilerServices.AsyncMethodBuilderCore.ctor(); | |
return result; | |
}; | |
$p.Start = function AsyncVoidMethodBuilder_Start(TStateMachine, stateMachine) { | |
this.m_coreState.Start(stateMachine.value); | |
}; | |
$p.SetStateMachine = function AsyncVoidMethodBuilder_SetStateMachine(stateMachine) { | |
this.m_coreState.SetStateMachine(stateMachine); | |
}; | |
$p.AwaitOnCompleted = function AsyncVoidMethodBuilder_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
try { | |
var completionAction = this.m_coreState.GetCompletionAction(System.Runtime.CompilerServices.AsyncVoidMethodBuilder, | |
TStateMachine, this, stateMachine); | |
awaiter.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted(completionAction); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync($e); | |
} | |
}; | |
$p.AwaitOnCompleted$1 = function AsyncVoidMethodBuilder_AwaitOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) { | |
try { | |
var completionAction = this.m_coreState.GetCompletionAction(System.Runtime.CompilerServices.AsyncVoidMethodBuilder, | |
TStateMachine, this, stateMachine.value); | |
awaiter.value.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted(completionAction); | |
} | |
catch ($e) { | |
$e = System.Exception.Wrap($e); | |
System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync($e); | |
} | |
}; | |
$p.AwaitUnsafeOnCompleted = function AsyncVoidMethodBuilder_AwaitUnsafeOnCompleted(TAwaiter, TStateMachine, awaiter, stateMachine) {}; | |
$p.SetResult = function AsyncVoidMethodBuilder_SetResult() {}; | |
$p.SetException = function AsyncVoidMethodBuilder_SetException(exception) { | |
throw $d.signEx(exception); | |
}; | |
}); | |
System.Runtime.CompilerServices.IAsyncStateMachine = $d.declare("System.Runtime.CompilerServices.IAsyncStateMachine", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["MoveNext", null, 6], ["SetStateMachine", null, 6]]]; }; | |
}); | |
System.Runtime.CompilerServices.INotifyCompletion = $d.declare("System.Runtime.CompilerServices.INotifyCompletion", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["OnCompleted", null, 6]]]; }; | |
}); | |
System.Runtime.CompilerServices.ICriticalNotifyCompletion = $d.declare("System.Runtime.CompilerServices.ICriticalNotifyCompletion", null, 66, $asm, function($t, $p) { | |
$t.$intfs = [System.Runtime.CompilerServices.INotifyCompletion]; | |
$t.$typeInfo = function(t, p) { return [161, null, [["UnsafeOnCompleted", null, 6]]]; }; | |
}); | |
System.Runtime.CompilerServices.IndexerNameAttribute = $d.declare("System.Runtime.CompilerServices.IndexerNameAttribute", System.Attribute, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]], null, null, [(function() { var $obj = new System.AttributeUsageAttribute.ctor(128);$obj.set_Inherited(true);return $obj; }).call(this)]]; }; | |
$t.ctor = function IndexerNameAttribute(indexerName) { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Runtime.CompilerServices.OperationCanceledException = $d.declare("System.Runtime.CompilerServices.OperationCanceledException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_CancellationToken", p.get_CancellationToken, 6], ["set_CancellationToken", p.set_CancellationToken, 6]], [["ctor", t.ctor, 6]], [["CancellationToken", System.Threading.CancellationToken, 0, 1]]]; }; | |
$t.$ator = function() { | |
this.CancellationToken = new System.Threading.CancellationToken.ctor(); | |
}; | |
$t.ctor = function OperationCanceledException() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_CancellationToken = function OperationCanceledException_get_CancellationToken() { return this.CancellationToken; }; | |
$p.set_CancellationToken = function OperationCanceledException_set_CancellationToken(value) { this.CancellationToken = value;return value; }; | |
}); | |
System.Runtime.CompilerServices.RuntimeWrappedException = $d.declare("System.Runtime.CompilerServices.RuntimeWrappedException", System.Exception, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_WrappedException", p.get_WrappedException, 6]], [["ctor", t.ctor, 3]], [["WrappedException", 1, 0]]]; }; | |
$t.$ator = function() { | |
this.m_wrappedException = null; | |
}; | |
$t.ctor = function RuntimeWrappedException(message, thrownObject) { | |
$t.$baseType.ctor$1.call(this, message || System.Environment.GetResourceString("RuntimeWrappedException")); | |
this.m_wrappedException = thrownObject; | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_WrappedException = function RuntimeWrappedException_get_WrappedException() { | |
return this.m_wrappedException; | |
}; | |
}); | |
System.Runtime.CompilerServices.TaskAwaiter = $d.declare("System.Runtime.CompilerServices.TaskAwaiter", null, 62, $asm, function($t, $p) { | |
$t.$intfs = [System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion]; | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_IsCompleted", p.get_IsCompleted, 6], ["OnCompleted", p.OnCompleted, 6], ["UnsafeOnCompleted", p.UnsafeOnCompleted, 6], ["GetResult", p.GetResult, 6]], [["ctor$1", t.ctor$1, 3], ["ctor", t.ctor, 6]], [["IsCompleted", 39, 0]]]; }; | |
$t.ctor = function TaskAwaiter() { | |
this.m_task = null; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function TaskAwaiter(task) { | |
this.m_task = task; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.get_IsCompleted = function TaskAwaiter_get_IsCompleted() { | |
return this.m_task.get_IsCompleted(); | |
}; | |
$p.OnCompleted = function TaskAwaiter_OnCompleted(continuation) { | |
this.m_task.SetContinuationForAwait(continuation); | |
}; | |
$p.UnsafeOnCompleted = function TaskAwaiter_UnsafeOnCompleted(continuation) { | |
this.m_task.SetContinuationForAwait(continuation); | |
}; | |
$p.GetResult = function TaskAwaiter_GetResult() { | |
if (this.m_task.get_IsFaulted()) | |
this.m_task.ThrowIfExceptional(false); | |
}; | |
$p.System$Runtime$CompilerServices$ICriticalNotifyCompletion$UnsafeOnCompleted = $p.UnsafeOnCompleted; | |
$p.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted = $p.OnCompleted; | |
}); | |
System.Runtime.CompilerServices.TaskAwaiter$1 = $d.declare("System.Runtime.CompilerServices.TaskAwaiter`1", null, 318, $asm, function($t, $p, TResult) { | |
$t.$intfs = [System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion]; | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_IsCompleted", p.get_IsCompleted, 6], ["OnCompleted", p.OnCompleted, 6], ["UnsafeOnCompleted", p.UnsafeOnCompleted, 6], ["GetResult", p.GetResult, 6]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6]], [["IsCompleted", 39, 0]]]; }; | |
$t.ctor = function TaskAwaiter$1() { | |
this.m_task = null; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function TaskAwaiter$1(mTask) { | |
this.m_task = mTask; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.get_IsCompleted = function TaskAwaiter$1_get_IsCompleted() { | |
return this.m_task.get_IsCompleted(); | |
}; | |
$p.OnCompleted = function TaskAwaiter$1_OnCompleted(continuation) { | |
this.m_task.SetContinuationForAwait(continuation); | |
}; | |
$p.UnsafeOnCompleted = function TaskAwaiter$1_UnsafeOnCompleted(continuation) { | |
this.m_task.SetContinuationForAwait(continuation); | |
}; | |
$p.GetResult = function TaskAwaiter$1_GetResult() { | |
if (!this.m_task.get_IsFaulted()) | |
return this.m_task.m_result; | |
this.m_task.ThrowIfExceptional(false); | |
return $d.default(TResult); | |
}; | |
$p.System$Runtime$CompilerServices$ICriticalNotifyCompletion$UnsafeOnCompleted = $p.UnsafeOnCompleted; | |
$p.System$Runtime$CompilerServices$INotifyCompletion$OnCompleted = $p.OnCompleted; | |
}, ["TResult"]); | |
System.Runtime.ExceptionServices.ExceptionDispatchInfo = $d.declare("System.Runtime.ExceptionServices.ExceptionDispatchInfo", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_BinaryStackTraceArray", p.get_BinaryStackTraceArray, 3], ["get_SourceException", p.get_SourceException, 6], ["Capture", t.Capture, 22], ["Throw", p.Throw, 6]], null, [["BinaryStackTraceArray", 1, 0], ["SourceException", 28, 1]]]; }; | |
$t.$ator = function() { | |
this.m_Exception = null; | |
this.m_stackTrace = null; | |
}; | |
$t.ctor = function ExceptionDispatchInfo(exception) { | |
$t.$baseType.ctor.call(this); | |
this.m_Exception = exception; | |
this.m_stackTrace = exception.get_StackTrace(); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_BinaryStackTraceArray = function ExceptionDispatchInfo_get_BinaryStackTraceArray() { | |
return this.m_stackTrace; | |
}; | |
$p.get_SourceException = function ExceptionDispatchInfo_get_SourceException() { | |
return this.m_Exception; | |
}; | |
$t.Capture = function ExceptionDispatchInfo_Capture(source) { | |
if (source == null) | |
throw new System.ArgumentNullException.ctor$1("source"); | |
else | |
return new System.Runtime.ExceptionServices.ExceptionDispatchInfo.ctor(source); | |
}; | |
$p.Throw = function ExceptionDispatchInfo_Throw() { | |
throw $d.signEx(this.m_Exception); | |
}; | |
}); | |
System.IntPtr = $d.declare("System.IntPtr", null, 53, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function IntPtr() {}; | |
$t.ctor.prototype = $p; | |
}); | |
System.MidpointRounding = $d.declareEnum("System.MidpointRounding", 45, $asm, 257, ["ToEven", "AwayFromZero"], [0, 1]); | |
System.Runtime.InteropServices.VoidTaskResult = $d.declare("System.Runtime.InteropServices.VoidTaskResult", null, 62, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [256, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function VoidTaskResult() {}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Runtime.Serialization.ISerializable = $d.declare("System.Runtime.Serialization.ISerializable", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [161, null, [["GetObjectData", null, 6]]]; }; | |
}); | |
System.SByte = $d.declare("System.SByte", Number, 41, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.SByte), System.IEquatable$1(System.SByte), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 41, 86, -128], ["MaxValue", 41, 86, 127]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = -128; | |
$t.MaxValue = 127; | |
$t.Parse = function SByte_Parse(s) { return Number.Parse(System.SByte, s); }; | |
$t.TryParse = function SByte_TryParse(s, result) { return Number.TryParse(System.SByte, s, result); }; | |
}); | |
System.Single = $d.declare("System.Single", Number, 50, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.Single), System.IEquatable$1(System.Single), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 50, 86, -3.402823E+38], ["Epsilon", 50, 86, 1.401298E-45], ["MaxValue", 50, 86, 3.402823E+38], ["NaN", 50, 86, NaN], ["NegativeInfinity", 50, 86, (-Infinity)], ["PositiveInfinity", 50, 86, Infinity]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22], ["IsNaN", t.IsNaN, 22], ["IsInfinity", t.IsInfinity, 22], ["IsNegativeInfinity", t.IsNegativeInfinity, 22], ["IsPositiveInfinity", t.IsPositiveInfinity, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = -3.40282346638529E+38; | |
$t.Epsilon = 1.4E-45; | |
$t.MaxValue = 3.40282346638529E+38; | |
$t.NaN = NaN; | |
$t.NegativeInfinity = (-Infinity); | |
$t.PositiveInfinity = Infinity; | |
$t.Parse = function Single_Parse(s) { return Number.Parse(System.Single, s); }; | |
$t.TryParse = function Single_TryParse(s, result) { return Number.TryParse(System.Single, s, result); }; | |
$t.IsNaN = function Single_IsNaN(f) { return isNaN(f); }; | |
$t.IsInfinity = function Single_IsInfinity(f) { return !isFinite(f); }; | |
$t.IsNegativeInfinity = function Single_IsNegativeInfinity(f) { return (f == (-Infinity)); }; | |
$t.IsPositiveInfinity = function Single_IsPositiveInfinity(f) { return (f == Infinity); }; | |
}); | |
System.Stopwatch = $d.declare("System.Stopwatch", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["Frequency", 47, 54], ["IsHighResolution", 39, 54]], [["Start", p.Start, 6], ["StartNew", t.StartNew, 22], ["Stop", p.Stop, 6], ["Reset", p.Reset, 6], ["Restart", p.Restart, 6], ["get_IsRunning", p.get_IsRunning, 6], ["get_Elapsed", p.get_Elapsed, 6], ["get_ElapsedMilliseconds", p.get_ElapsedMilliseconds, 6], ["get_ElapsedTicks", p.get_ElapsedTicks, 6], ["GetTimestamp", t.GetTimestamp, 22]], [["ctor", t.ctor, 6]], [["IsRunning", 39, 5], ["Elapsed", 58, 6], ["ElapsedMilliseconds", 47, 7], ["ElapsedTicks", 47, 8]]]; }; | |
$t.cctor = function() { | |
$t.Frequency = 0; | |
$t.IsHighResolution = false; | |
$t.IsHighResolution = window.performance; | |
$t.Frequency = 10000000; | |
}; | |
$t.$ator = function() { | |
this.elapsed = 0; | |
this.startTimeStamp = 0; | |
this.isRunning = false; | |
}; | |
$t.ctor = function Stopwatch() { | |
$t.$baseType.ctor.call(this); | |
this.Reset(); | |
}; | |
$t.ctor.prototype = $p; | |
$p.Start = function Stopwatch_Start() { | |
if (!this.isRunning) { | |
this.startTimeStamp = $t.GetTimestamp(); | |
this.isRunning = true; | |
} | |
}; | |
$t.StartNew = function Stopwatch_StartNew() { | |
var s = new System.Stopwatch.ctor(); | |
s.Start(); | |
return s; | |
}; | |
$p.Stop = function Stopwatch_Stop() { | |
if (this.isRunning) { | |
var endTimeStamp = $t.GetTimestamp(); | |
var elapsedThisPeriod = endTimeStamp - this.startTimeStamp; | |
this.elapsed += elapsedThisPeriod; | |
this.isRunning = false; | |
if (this.elapsed < 0) { | |
this.elapsed = 0; | |
} | |
} | |
}; | |
$p.Reset = function Stopwatch_Reset() { | |
this.elapsed = 0; | |
this.isRunning = false; | |
this.startTimeStamp = 0; | |
}; | |
$p.Restart = function Stopwatch_Restart() { | |
this.elapsed = 0; | |
this.startTimeStamp = $t.GetTimestamp(); | |
this.isRunning = true; | |
}; | |
$p.get_IsRunning = function Stopwatch_get_IsRunning() { | |
return this.isRunning; | |
}; | |
$p.get_Elapsed = function Stopwatch_get_Elapsed() { | |
return new System.TimeSpan.ctor$1(this.GetRawElapsedTicks()); | |
}; | |
$p.get_ElapsedMilliseconds = function Stopwatch_get_ElapsedMilliseconds() { | |
return (this.GetRawElapsedTicks() / 10000 | 0); | |
}; | |
$p.get_ElapsedTicks = function Stopwatch_get_ElapsedTicks() { | |
return this.GetRawElapsedTicks(); | |
}; | |
$t.GetTimestamp = function Stopwatch_GetTimestamp() { | |
if ($t().IsHighResolution) { | |
return $d.toInt64((window.performance.now() * 10000)); | |
} | |
else { | |
return Date.now() * 10000; | |
} | |
}; | |
$p.GetRawElapsedTicks = function Stopwatch_GetRawElapsedTicks() { | |
var timeElapsed = this.elapsed; | |
if (this.isRunning) { | |
var currentTimeStamp = $t.GetTimestamp(); | |
var elapsedUntilNow = currentTimeStamp - this.startTimeStamp; | |
timeElapsed += elapsedUntilNow; | |
} | |
return timeElapsed; | |
}; | |
}); | |
System.String = $d.declare("System.String", System.Object, 20, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(String), System.Collections.Generic.IEnumerable$1(System.Char), System.Collections.IEnumerable, System.IEquatable$1(String)]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["Empty", 20, 54]], [["get_Chars", p.get_Chars, 6], ["IndexOf", p.IndexOf, 6], ["IndexOf", p.IndexOf$1, 6], ["LastIndexOf", p.LastIndexOf, 6], ["LastIndexOf", p.LastIndexOf$1, 6], ["EndsWith", p.EndsWith, 6], ["StartsWith", p.StartsWith, 6], ["StartsWith", p.StartsWith$1, 6], ["Compare", t.Compare, 22], ["Compare", t.Compare$1, 22], ["Substring", p.Substring, 6], ["Substring", p.Substring$1, 6], ["Split", p.Split, 6], ["Split", p.Split$3, 6], ["Split", p.Split$2, 6], ["Split", p.Split$5, 6], ["Split", p.Split$4, 6], ["Split", p.Split$6, 6], ["Join", t.Join, 22], ["Join", t.Join$1, 22], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6], ["IsNullOrEmpty", t.IsNullOrEmpty, 22], ["Concat", t.Concat$1, 22], ["Concat", t.Concat$4, 22], ["Concat", t.Concat$6, 22], ["Concat", t.Concat$2, 22], ["Concat", t.Concat$9, 22], ["Concat", t.Concat, 22], ["Concat", t.Concat$5, 22], ["Concat", t.Concat$7, 22], ["Concat", t.Concat$8, 22], ["Concat", t.Concat$3, 22], ["Format", t.Format, 22], ["Format", t.Format$1, 22], ["GetEnumerator", p.GetEnumerator, 6], ["Contains", p.Contains, 6], ["CompareTo", p.CompareTo, 6], ["CompareTo", p.CompareTo$1, 6], ["Equals", p.Equals$1, 6], ["Equals", p.Equals$2, 6], ["Equals", t.Equals, 22], ["Replace", p.Replace$1, 6], ["Replace", p.Replace, 6], ["ToCharArray", p.ToCharArray, 6], ["ToCharArray", p.ToCharArray$1, 6], ["Trim", p.Trim$1, 6], ["TrimStart", p.TrimStart, 6], ["TrimEnd", p.TrimEnd, 6]], [["ctor$1", t.ctor$1, 6], ["ctor", t.ctor, 6], ["ctor$3", t.ctor$3, 6], ["ctor$2", t.ctor$2, 6]], [["this[]", 40, 0, null, [["index", 45, 0]], [new System.Runtime.CompilerServices.IndexerNameAttribute.ctor("Chars")]]]]; }; | |
$t.Empty = ""; | |
$t.ctor$1 = function(s) { | |
return s; | |
}; | |
$t.ctor = function(value) { | |
return String.fromCharCode.apply(null, value); | |
}; | |
$t.ctor$3 = function(value, startIndex, length) { | |
var array = value; | |
if (startIndex != 0 || length != value.length) | |
array = Array.prototype.slice.call(array, startIndex, startIndex + length); | |
return String.fromCharCode.apply(null, array); | |
}; | |
$t.ctor$2 = function(c, count) { | |
if (count == 0) | |
return ""; | |
else | |
if (count == 1) | |
return String.fromCharCode(c); | |
else | |
return new Array(count + 1).join(String.fromCharCode(c)); | |
}; | |
$p.get_Chars = function String_get_Chars(index) { | |
var c = this.charCodeAt(index); | |
if (isNaN(c)) | |
throw new System.IndexOutOfRangeException.ctor(); | |
return c; | |
}; | |
$p.IndexOf = function String_IndexOf(value) { | |
return this.indexOf(String.fromCharCode(value)); | |
}; | |
$p.IndexOf$1 = function String_IndexOf(value, startIndex) { | |
return this.indexOf(String.fromCharCode(value), startIndex); | |
}; | |
$p.LastIndexOf = function String_LastIndexOf(value) { | |
return this.lastIndexOf(String.fromCharCode(value)); | |
}; | |
$p.LastIndexOf$1 = function String_LastIndexOf(value, startIndex) { | |
return this.lastIndexOf(String.fromCharCode(value), startIndex); | |
}; | |
$p.EndsWith = function String_EndsWith(value) { | |
return this.indexOf(value, this.length - value.length) != -1; | |
}; | |
$p.StartsWith = function String_StartsWith(value) { | |
return this.Substring$1(0, value.length) == value; | |
}; | |
$p.StartsWith$1 = function String_StartsWith(value, comparisonType) { | |
switch (comparisonType) { | |
case 1: | |
case 3: | |
case 5: | |
return this.Substring$1(0, value.length).toUpperCase() == value.toUpperCase(); | |
default: | |
return this.Substring$1(0, value.length) == value; | |
} | |
}; | |
$t.Compare = function String_Compare(strA, strB) { | |
if (strA == null && strB == null) | |
return 0; | |
if (strA == null) | |
return -1; | |
if (strB == null) | |
return 1; | |
if (strA < strB) | |
return -1; | |
if (strA > strB) | |
return 1; | |
return 0; | |
}; | |
$t.Compare$1 = function String_Compare(strA, strB, comparisonType) { | |
if ($d.toUInt32((comparisonType | 0)) > 5) | |
throw new System.ArgumentException.ctor$1("NotSupported_StringComparison"); | |
if (strA == strB) | |
return 0; | |
if (strA == null) | |
return -1; | |
if (strB == null) | |
return 1; | |
switch (comparisonType) { | |
case 0: | |
return System.Globalization.CultureInfo().CurrentCulture.get_CompareInfo().Compare$1(strA, | |
strB, 0); | |
case 1: | |
return System.Globalization.CultureInfo().CurrentCulture.get_CompareInfo().Compare$1(strA, | |
strB, 1); | |
case 2: | |
return System.Globalization.CultureInfo().InvariantCulture.get_CompareInfo().Compare$1(strA, | |
strB, 0); | |
case 3: | |
return System.Globalization.CultureInfo().InvariantCulture.get_CompareInfo().Compare$1(strA, | |
strB, 1); | |
case 4: | |
return $t.CompareOrdinal(strA, strB, false); | |
case 5: | |
return $t.CompareOrdinal(strA, strB, true); | |
default: | |
throw new System.NotSupportedException.ctor$1("NotSupported_StringComparison"); | |
} | |
}; | |
$t.CompareOrdinal = function String_CompareOrdinal(strA, strB, ignoreCase) { | |
if (ignoreCase) { | |
strA = strA.toUpperCase(); | |
strB = strB.toUpperCase(); | |
} | |
return (strA == strB) ? 0 : (strA < strB) ? -1 : 1; | |
}; | |
$p.Substring = function String_Substring(startIndex) { | |
return this.substring(startIndex); | |
}; | |
$p.Substring$1 = function String_Substring(startIndex, length) { | |
return this.substring(startIndex, startIndex + length); | |
}; | |
$p.Split = function String_Split(separator) { | |
var s = this; | |
var stringSeparator = $d.array(System.Char, separator.length); | |
for (var i = 0; i < separator.length; i++) { | |
stringSeparator[i] = separator[i]; | |
} | |
var array = s.split(new RegExp($t.Join$1(String, "|", System.Linq.Enumerable.Select(System.Char, | |
String, stringSeparator, $d.delegate(function(x) { | |
return this.EscapeRegex(x); | |
}, this))))); | |
return $d.array(String, array); | |
}; | |
$p.Split$3 = function String_Split(separator, count) { | |
var s = this; | |
var stringSeparator = $d.array(System.Char, separator.length); | |
for (var i = 0; i < separator.length; i++) { | |
stringSeparator[i] = separator[i]; | |
} | |
var array = s.split(new RegExp($t.Join$1(String, "|", System.Linq.Enumerable.Select(System.Char, | |
String, stringSeparator, $d.delegate(function(x) { | |
return this.EscapeRegex(x); | |
}, this)))), count); | |
return array; | |
}; | |
$p.EscapeRegex = function String_EscapeRegex(c) { | |
switch (c) { | |
case 63 /*'?'*/: | |
return "\\?"; | |
} | |
return String.fromCharCode(c); | |
}; | |
$p.Split$2 = function String_Split(separator, options) { | |
return null; | |
}; | |
$p.Split$5 = function String_Split(separator, count, options) { | |
return null; | |
}; | |
$p.Split$4 = function String_Split(separator, options) { | |
return this.Split$6(separator, 2147483647, options); | |
}; | |
$p.Split$6 = function String_Split(separator, count, options) { | |
return null; | |
}; | |
$t.Join = function String_Join(separator, value) { | |
return $t.InternalJoin(separator, value); | |
}; | |
$t.Join$1 = function String_Join(T, separator, values) { | |
return $t.InternalJoin(separator, System.Linq.Enumerable.ToArray(String, System.Linq.Enumerable.Select(T, | |
String, values, $d.delegate(function(x) { | |
return x.toString(); | |
}, this)))); | |
}; | |
$t.InternalJoin = function String_InternalJoin(separator, value) { | |
return value.join(separator); | |
}; | |
$p.Equals = function String_Equals(obj) { | |
return this == obj; | |
}; | |
$p.GetHashCode = function String_GetHashCode() { | |
var hash = 0; | |
for (var i = 0; i < this.length; i++) { | |
var ch = this.charCodeAt(i); | |
hash = ((hash << 5) - hash) + ch; | |
hash |= 0; | |
} | |
return hash; | |
}; | |
$p.ToString = function String_ToString() { | |
return this.toString(); | |
}; | |
$t.IsNullOrEmpty = function String_IsNullOrEmpty(s) { | |
return (s == null) || (s == ""); | |
}; | |
$t.Concat$1 = function String_Concat(arg0) { | |
if (arg0 == null) | |
return String.Empty; | |
else | |
return arg0.toString(); | |
}; | |
$t.Concat$4 = function String_Concat(arg0, arg1) { | |
if (arg0 == null) | |
arg0 = String.Empty; | |
if (arg1 == null) | |
arg1 = String.Empty; | |
return arg0.toString() + $d.toString(arg1); | |
}; | |
$t.Concat$6 = function String_Concat(arg0, arg1, arg2) { | |
if (arg0 == null) | |
arg0 = String.Empty; | |
if (arg1 == null) | |
arg1 = String.Empty; | |
if (arg2 == null) | |
arg2 = String.Empty; | |
return arg0.toString() + $d.toString(arg1) + $d.toString(arg2); | |
}; | |
$t.Concat$2 = function String_Concat(args) { | |
if (args == null) | |
throw new System.ArgumentNullException.ctor$1("args"); | |
var values = $d.array(String, args.length); | |
var totalLength = 0; | |
for (var index = 0; index < args.length; ++index) { | |
var obj = args[index]; | |
values[index] = obj == null ? String.Empty : obj.toString(); | |
if (values[index] == null) | |
values[index] = String.Empty; | |
totalLength += values[index].length; | |
if (totalLength < 0) | |
throw new System.Exception.ctor(); | |
} | |
return $t.ConcatArray(values, totalLength); | |
}; | |
$t.ConcatArray = function String_ConcatArray(values, totalLength) { | |
var s = ""; | |
for (var $i = 0, $length = values.length; $i != $length; $i++) { | |
var item = values[$i]; | |
s += item; | |
} | |
return s; | |
}; | |
$t.Concat$9 = function String_Concat(T, values) { | |
var s = ""; | |
var $iter = values; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
s += item.toString(); | |
} | |
return s; | |
}; | |
$t.Concat = function String_Concat(values) { | |
var s = ""; | |
var $iter = values; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var item = $enumerator.System$Collections$IEnumerator$get_Current(); | |
s += item; | |
} | |
return s; | |
}; | |
$t.Concat$5 = function String_Concat(str0, str1) { | |
return str0 + str1; | |
}; | |
$t.Concat$7 = function String_Concat(str0, str1, str2) { | |
if (str0 == null && str1 == null && str2 == null) | |
return String.Empty; | |
if (str0 == null) | |
str0 = String.Empty; | |
if (str1 == null) | |
str1 = String.Empty; | |
if (str2 == null) | |
str2 = String.Empty; | |
return str0 + str1 + str2; | |
}; | |
$t.Concat$8 = function String_Concat(str0, str1, str2, str3) { | |
if (str0 == null && str1 == null && (str2 == null && str3 == null)) | |
return String.Empty; | |
if (str0 == null) | |
str0 = String.Empty; | |
if (str1 == null) | |
str1 = String.Empty; | |
if (str2 == null) | |
str2 = String.Empty; | |
if (str3 == null) | |
str3 = String.Empty; | |
return str0 + str1 + str2 + str3; | |
}; | |
$t.Concat$3 = function String_Concat(values) { | |
var s = ""; | |
for (var $i = 0, $length = values.length; $i != $length; $i++) { | |
var item = values[$i]; | |
s += item; | |
} | |
return s; | |
}; | |
$t.Format = function String_Format(format, args) { | |
if (format == null || args == null) | |
throw new System.ArgumentNullException.ctor$1(format == null ? "format" : "args"); | |
else | |
return $t.Format$1(null, format, args); | |
}; | |
$t.Format$1 = function String_Format(provider, format, args) { | |
if (format == null || args == null) | |
throw new System.ArgumentNullException.ctor$1(format == null ? "format" : "args"); | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.AppendFormat$2(provider, format, args); | |
return sb.toString(); | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function String_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.GetEnumerator = function String_GetEnumerator() { | |
var $stateMachineFunc = function() { | |
var $this = this; | |
var $state = 0; | |
var $stateMachine = new (System.YieldIterator$1(System.Char).ctor)(); | |
var i = null; | |
var $moveNext = function() { | |
$top: | |
while (true) { | |
switch ($state) { | |
case 0: | |
i = 0; | |
$state = 1; | |
continue $top; | |
case 1: | |
while (i < this.length) { | |
$state = 3; | |
continue $top; | |
} | |
$state = 2; | |
continue $top; | |
case 2: | |
return false; | |
case 3: | |
$state = 5; | |
$stateMachine.set_Current(this.get_Chars(i)); | |
return true; | |
case 4: | |
i++; | |
$state = 1; | |
continue $top; | |
case 5: | |
$state = 4; | |
continue $top; | |
} | |
return false; | |
} | |
}; | |
$stateMachine.System$Collections$IEnumerator$MoveNext = function() { | |
return $moveNext.call($this); | |
}; | |
$stateMachine.Clone = function() { | |
return $stateMachineFunc.call($this); | |
}; | |
return $stateMachine; | |
}; | |
return $stateMachineFunc.call(this); | |
}; | |
$p.Contains = function String_Contains(part) { | |
return this.indexOf(part) != -1; | |
}; | |
$p.CompareTo = function String_CompareTo(obj) { | |
return $t.Compare(this, $d.cast(obj, String)); | |
}; | |
$p.CompareTo$1 = function String_CompareTo(other) { | |
return $t.Compare(this, other); | |
}; | |
$p.Equals$1 = function String_Equals(other) { | |
return this == other; | |
}; | |
$p.Equals$2 = function String_Equals(value, comparisonType) { | |
switch (comparisonType) { | |
case 1: | |
case 3: | |
case 5: | |
return this.toUpperCase() == value.toUpperCase(); | |
default: | |
return this == value; | |
} | |
}; | |
$t.Equals = function String_Equals(a, b, comparisonType) { | |
return (a == null && b == null) || a.Equals$2(b, comparisonType); | |
}; | |
$t.EscapeRegex = function String_EscapeRegex(text) { | |
return text.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | |
}; | |
$p.Replace$1 = function String_Replace(searchString, replaceString) { | |
return this.replace(new RegExp($t.EscapeRegex(searchString), "g"), replaceString); | |
}; | |
$p.Replace = function String_Replace(searchChar, replaceChar) { | |
return this.Replace$1(String.fromCharCode(searchChar), String.fromCharCode(replaceChar)); | |
}; | |
$p.ToCharArray = function String_ToCharArray() { | |
return this.ToCharArray$1(0, this.length); | |
}; | |
$p.ToCharArray$1 = function String_ToCharArray(startIndex, length) { | |
if (startIndex < 0 || startIndex > this.length || startIndex > this.length - length) | |
throw new System.ArgumentOutOfRangeException.ctor$1("startIndex"); | |
if (length < 0) | |
throw new System.ArgumentOutOfRangeException.ctor$1("length"); | |
var chars = $d.array(System.Char, length); | |
if (length > 0) { | |
for (var k = 0; k < length; ++k) { | |
chars[k] = this.get_Chars(k + startIndex); | |
} | |
} | |
return chars; | |
}; | |
$p.Trim$1 = function String_Trim(trimChars) { | |
if (null == trimChars || trimChars.length == 0) { | |
return this.TrimHelper(2); | |
} | |
return this.TrimHelper$1(trimChars, 2); | |
}; | |
$p.TrimStart = function String_TrimStart(trimChars) { | |
if (null == trimChars || trimChars.length == 0) { | |
return this.TrimHelper(0); | |
} | |
return this.TrimHelper$1(trimChars, 0); | |
}; | |
$p.TrimEnd = function String_TrimEnd(trimChars) { | |
if (null == trimChars || trimChars.length == 0) { | |
return this.TrimHelper(1); | |
} | |
return this.TrimHelper$1(trimChars, 1); | |
}; | |
$p.TrimHelper = function String_TrimHelper(trimType) { | |
var end = this.length - 1; | |
var start = 0; | |
if (trimType != 1) { | |
for (start = 0; start < this.length; start++) { | |
if (!System.Char.IsWhiteSpace(this.get_Chars(start))) | |
break; | |
} | |
} | |
if (trimType != 0) { | |
for (end = this.length - 1; end >= start; end--) { | |
if (!System.Char.IsWhiteSpace(this.get_Chars(end))) | |
break; | |
} | |
} | |
return this.substring(start, end + 1); | |
}; | |
$p.TrimHelper$1 = function String_TrimHelper(trimChars, trimType) { | |
var end = this.length - 1; | |
var start = 0; | |
if (trimType != 1) { | |
for (start = 0; start < this.length; start++) { | |
var i = 0; | |
var ch = this.get_Chars(start); | |
for (i = 0; i < trimChars.length; i++) { | |
if (trimChars[i] == ch) | |
break; | |
} | |
if (i == trimChars.length) { | |
break; | |
} | |
} | |
} | |
if (trimType != 0) { | |
for (end = this.length - 1; end >= start; end--) { | |
var i = 0; | |
var ch = this.get_Chars(end); | |
for (i = 0; i < trimChars.length; i++) { | |
if (trimChars[i] == ch) | |
break; | |
} | |
if (i == trimChars.length) { | |
break; | |
} | |
} | |
} | |
return this.substring(start, end + 1); | |
}; | |
$p.System$IComparable$CompareTo = $p.CompareTo; | |
$p.System$IComparable$1$CompareTo = $p.CompareTo$1; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
$p.System$IEquatable$1$Equals = $p.Equals$1; | |
}, null, null, String); | |
System.StringComparison = $d.declareEnum("System.StringComparison", 45, $asm, 257, ["CurrentCulture", "CurrentCultureIgnoreCase", "InvariantCulture", "InvariantCultureIgnoreCase", "Ordinal", "OrdinalIgnoreCase"], [0, 1, 2, 3, 4, 5]); | |
System.StringSplitOptions = $d.declareEnum("System.StringSplitOptions", 45, $asm, 289, ["None", "RemoveEmptyEntries"], [0, 0x1]); | |
System.Text.StringBuilder = $d.declare("System.Text.StringBuilder", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, [["get_Item", p.get_Item, 6], ["get_Length", p.get_Length, 6], ["set_Length", p.set_Length, 6], ["Append", p.Append$12, 6], ["Append", p.Append, 6], ["Append", p.Append$10, 6], ["Append", p.Append$1, 6], ["Append", p.Append$11, 6], ["Append", p.Append$7, 6], ["Append", p.Append$8, 6], ["Append", p.Append$6, 6], ["Append", p.Append$5, 6], ["Append", p.Append$4, 6], ["Append", p.Append$15, 6], ["Append", p.Append$13, 6], ["Append", p.Append$14, 6], ["Append", p.Append$3, 6], ["Append", p.Append$17, 6], ["Append", p.Append$2, 6], ["Append", p.Append$9, 6], ["AppendLine", p.AppendLine, 6], ["AppendLine", p.AppendLine$1, 6], ["Append", p.Append$18, 6], ["AppendFormat", p.AppendFormat$1, 6], ["AppendFormat", p.AppendFormat, 6], ["AppendFormat", p.AppendFormat$3, 6], ["AppendFormat", p.AppendFormat$4, 6], ["AppendFormat", p.AppendFormat$2, 6], ["Append", p.Append$16, 6], ["ToString", p.ToString, 6], ["Clear", p.Clear, 6], ["Remove", p.Remove, 3]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6], ["ctor$3", t.ctor$3, 6], ["ctor$2", t.ctor$2, 6]], [["this[]", 40, 0, null, [["index", 45, 0]]], ["Length", 45, 1, 2]]]; }; | |
$t.$ator = function() { | |
this.chunks = new Array(); | |
this.length = 0; | |
this.maxCapacity = 0; | |
}; | |
$p.get_Item = function StringBuilder_get_Item(index) { | |
if (index < 0 || index >= this.length) | |
throw new System.ArgumentOutOfRangeException.ctor$1("index"); | |
for (var $i = 0, $length = this.chunks.length; $i != $length; $i++) { | |
var chunk = this.chunks[$i]; | |
if (index < chunk.length) | |
return chunk.get_Chars(index); | |
index -= chunk.length; | |
} | |
throw new System.Exception.ctor$1("StringBuilder.this: consistency error"); | |
}; | |
$t.ctor = function StringBuilder() { | |
$t.ctor$3.call(this, 0, 0); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function StringBuilder(capacity) { | |
$t.ctor$3.call(this, capacity, 0); | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$3 = function StringBuilder(capacity, maxCapacity) { | |
$t.$baseType.ctor.call(this); | |
this.maxCapacity = maxCapacity <= 0 ? 2147483647 : maxCapacity; | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$2 = function StringBuilder(initialText) { | |
$t.ctor$3.call(this, 0, 0); | |
this.Append$12(initialText); | |
}; | |
$t.ctor$2.prototype = $p; | |
$p.get_Length = function StringBuilder_get_Length() { | |
return this.length; | |
}; | |
$p.set_Length = function StringBuilder_set_Length(value) { | |
if (value == this.length) | |
return; | |
if (value == 0) | |
this.Clear(); | |
else | |
throw new System.NotSupportedException.ctor$1("Setting StringBuilder.Length other than 0 is not supported"); | |
return value; | |
}; | |
$p.Append$12 = function StringBuilder_Append(s) { | |
if (s != null) { | |
var newLength = this.length + s.length; | |
if (newLength > this.maxCapacity) { | |
throw new System.ArgumentOutOfRangeException.ctor$1("StringBuilder max capacity exceeded"); | |
} | |
this.chunks.push(s); | |
this.length += s.length; | |
} | |
return this; | |
}; | |
$p.Append = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$10 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$1 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$11 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$7 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$8 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$6 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$5 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$4 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$15 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$13 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$14 = function StringBuilder_Append(value) { | |
this.Append$12(value.toString()); | |
return this; | |
}; | |
$p.Append$3 = function StringBuilder_Append(value) { | |
this.Append$12(String.ctor(value)); | |
return this; | |
}; | |
$p.Append$17 = function StringBuilder_Append(value, startIndex, charCount) { | |
this.Append$12(String.ctor$3(value, startIndex, charCount)); | |
return this; | |
}; | |
$p.Append$2 = function StringBuilder_Append(value) { | |
this.Append$12(String.fromCharCode(value)); | |
return this; | |
}; | |
$p.Append$9 = function StringBuilder_Append(o) { | |
if (o != null) { | |
var s = o.toString(); | |
this.Append$12(s); | |
} | |
return this; | |
}; | |
$p.AppendLine = function StringBuilder_AppendLine() { | |
return this.Append$12("\n"); | |
}; | |
$p.AppendLine$1 = function StringBuilder_AppendLine(s) { | |
return this.Append$12(s).AppendLine(); | |
}; | |
$p.Append$18 = function StringBuilder_Append(value, startIndex, length) { | |
return this.Append$12(value.Substring$1(startIndex, length)); | |
}; | |
$p.AppendFormat$1 = function StringBuilder_AppendFormat(format, args) { | |
return this.AppendFormat$2(null, format, args); | |
}; | |
$p.AppendFormat = function StringBuilder_AppendFormat(format, arg0) { | |
return this.AppendFormat$2(null, format, $d.array(System.Object, [arg0])); | |
}; | |
$p.AppendFormat$3 = function StringBuilder_AppendFormat(format, arg0, arg1) { | |
return this.AppendFormat$2(null, format, $d.array(System.Object, [arg0, arg1])); | |
}; | |
$p.AppendFormat$4 = function StringBuilder_AppendFormat(format, arg0, arg1, arg2) { | |
return this.AppendFormat$2(null, format, $d.array(System.Object, [arg0, arg1, arg2])); | |
}; | |
$t.FormatError = function StringBuilder_FormatError() { | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_InvalidString")); | |
}; | |
$p.AppendFormat$2 = function StringBuilder_AppendFormat(provider, format, args) { | |
if (format == null || args == null) { | |
throw new System.ArgumentNullException.ctor$1((format == null) ? "format" : "args"); | |
} | |
var pos = 0; | |
var len = format.length; | |
var ch = 0; | |
var cf = null; | |
if (provider != null) { | |
cf = $d.cast(provider.System$IFormatProvider$GetFormat($d.typeOf(System.ICustomFormatter)), | |
System.ICustomFormatter); | |
} | |
while (true) { | |
var p = pos; | |
var i = pos; | |
while (pos < len) { | |
ch = format.get_Chars(pos); | |
pos++; | |
if (ch == 125 /*'}'*/) { | |
if (pos < len && format.get_Chars(pos) == 125 /*'}'*/) | |
pos++; | |
else | |
$t.FormatError(); | |
} | |
if (ch == 123 /*'{'*/) { | |
if (pos < len && format.get_Chars(pos) == 123 /*'{'*/) | |
pos++; | |
else { | |
pos--; | |
break; | |
} | |
} | |
this.Append$2(ch); | |
} | |
if (pos == len) | |
break; | |
pos++; | |
if (pos == len || (ch = format.get_Chars(pos)) < 48 /*'0'*/ || ch > 57 /*'9'*/) | |
$t.FormatError(); | |
var index = 0; | |
do { | |
index = index * 10 + ch - 48 /*'0'*/; | |
pos++; | |
if (pos == len) | |
$t.FormatError(); | |
ch = format.get_Chars(pos); | |
} | |
while (ch >= 48 /*'0'*/ && ch <= 57 /*'9'*/ && index < 1000000); | |
if (index >= args.length) | |
throw new System.FormatException.ctor$1(System.Environment.GetResourceString("Format_IndexOutOfRange")); | |
while (pos < len && (ch = format.get_Chars(pos)) == 32 /*' '*/) { | |
pos++; | |
} | |
var leftJustify = false; | |
var width = 0; | |
if (ch == 44 /*','*/) { | |
pos++; | |
while (pos < len && format.get_Chars(pos) == 32 /*' '*/) { | |
pos++; | |
} | |
if (pos == len) | |
$t.FormatError(); | |
ch = format.get_Chars(pos); | |
if (ch == 45 /*'-'*/) { | |
leftJustify = true; | |
pos++; | |
if (pos == len) | |
$t.FormatError(); | |
ch = format.get_Chars(pos); | |
} | |
if (ch < 48 /*'0'*/ || ch > 57 /*'9'*/) | |
$t.FormatError(); | |
do { | |
width = width * 10 + ch - 48 /*'0'*/; | |
pos++; | |
if (pos == len) | |
$t.FormatError(); | |
ch = format.get_Chars(pos); | |
} | |
while (ch >= 48 /*'0'*/ && ch <= 57 /*'9'*/ && width < 1000000); | |
} | |
while (pos < len && (ch = format.get_Chars(pos)) == 32 /*' '*/) { | |
pos++; | |
} | |
var arg = args[index]; | |
var fmt = null; | |
if (ch == 58 /*':'*/) { | |
pos++; | |
p = pos; | |
i = pos; | |
while (true) { | |
if (pos == len) | |
$t.FormatError(); | |
ch = format.get_Chars(pos); | |
pos++; | |
if (ch == 123 /*'{'*/) { | |
if (pos < len && format.get_Chars(pos) == 123 /*'{'*/) | |
pos++; | |
else | |
$t.FormatError(); | |
} | |
else | |
if (ch == 125 /*'}'*/) { | |
if (pos < len && format.get_Chars(pos) == 125 /*'}'*/) | |
pos++; | |
else { | |
pos--; | |
break; | |
} | |
} | |
if (fmt == null) { | |
fmt = new System.Text.StringBuilder.ctor(); | |
} | |
fmt.Append$2(ch); | |
} | |
} | |
if (ch != 125 /*'}'*/) | |
$t.FormatError(); | |
pos++; | |
var sFmt = null; | |
var s = null; | |
if (cf != null) { | |
if (fmt != null) { | |
sFmt = fmt.toString(); | |
} | |
s = cf.System$ICustomFormatter$Format(sFmt, arg, provider); | |
} | |
if (s == null) { | |
var formattableArg = $d.as(arg, System.IFormattable); | |
if (formattableArg != null) { | |
if (sFmt == null && fmt != null) { | |
sFmt = fmt.toString(); | |
} | |
s = formattableArg.System$IFormattable$ToString(sFmt, provider); | |
} | |
else | |
if (arg != null) { | |
s = arg.toString(); | |
} | |
} | |
if (s == null) | |
s = String.Empty; | |
var pad = width - s.length; | |
if (!leftJustify && pad > 0) | |
this.Append$16(32 /*' '*/, pad); | |
this.Append$12(s); | |
if (leftJustify && pad > 0) | |
this.Append$16(32 /*' '*/, pad); | |
} | |
return this; | |
}; | |
$p.Append$16 = function StringBuilder_Append(value, repeatCount) { | |
if (repeatCount < 0) | |
throw new System.ArgumentOutOfRangeException.ctor(); | |
var s = String.ctor$2(value, repeatCount); | |
return this.Append$12(s); | |
}; | |
$p.ToString = function StringBuilder_ToString() { | |
return this.chunks.join(""); | |
}; | |
$p.Clear = function StringBuilder_Clear() { | |
this.chunks.length = 0; | |
this.length = 0; | |
return this; | |
}; | |
$p.Remove = function StringBuilder_Remove(index, count) { | |
var temp = this.toString(); | |
this.Clear(); | |
this.Append$12(temp.Substring$1(0, index)); | |
this.Append$12(temp.Substring$1(index + count, temp.length - index - count)); | |
return this; | |
}; | |
}); | |
System.Threading.CancellationToken = $d.declare("System.Threading.CancellationToken", null, 62, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function CancellationToken() {}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Threading.Interlocked = $d.declare("System.Threading.Interlocked", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["CompareExchange", t.CompareExchange, 22], ["Exchange", t.Exchange, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function Interlocked() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.CompareExchange = function Interlocked_CompareExchange(T, location1, value, comparand) { | |
var oldValue = location1.value; | |
if (System.Collections.Generic.EqualityComparer$1(T).get_Default().Equals$1(location1.value, | |
comparand)) | |
location1.value = value; | |
return oldValue; | |
}; | |
$t.Exchange = function Interlocked_Exchange(T, location1, value) { | |
var oldValue = location1.value; | |
location1.value = value; | |
return oldValue; | |
}; | |
}); | |
System.Threading.Tasks.Task = $d.declare("System.Threading.Tasks.Task", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, [["isCompleted", 39, 4], ["isFaulted", 39, 4], ["m_continuationObject", System.Action, 4]], [["get_IsCompleted", p.get_IsCompleted, 6], ["get_IsFaulted", p.get_IsFaulted, 6], ["FromResult", t.FromResult, 22], ["GetAwaiter", p.GetAwaiter, 6], ["Wait", p.Wait, 6], ["SetContinuationForAwait", p.SetContinuationForAwait, 3], ["Finish", p.Finish, 3], ["ContinueWith", p.ContinueWith$1, 6], ["ContinueWith", p.ContinueWith, 6], ["ThrowIfExceptional", p.ThrowIfExceptional, 3], ["TrySetException", p.TrySetException, 3], ["TrySetCanceled", p.TrySetCanceled, 3], ["TrySetCanceled", p.TrySetCanceled$1, 3]], [["ctor", t.ctor, 6]], [["IsCompleted", 39, 0], ["IsFaulted", 39, 1]]]; }; | |
$t.$ator = function() { | |
this.isCompleted = false; | |
this.isFaulted = false; | |
this.m_continuationObject = null; | |
this.exceptions = null; | |
}; | |
$t.ctor = function Task() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_IsCompleted = function Task_get_IsCompleted() { | |
return this.isCompleted; | |
}; | |
$p.get_IsFaulted = function Task_get_IsFaulted() { | |
return this.isFaulted; | |
}; | |
$t.FromResult = function Task_FromResult(TResult, result) { | |
return new (System.Threading.Tasks.Task$1(TResult).ctor$1)(result); | |
}; | |
$p.GetAwaiter = function Task_GetAwaiter() { | |
return new System.Runtime.CompilerServices.TaskAwaiter.ctor$1(this); | |
}; | |
$p.Wait = function Task_Wait(continueWith) {}; | |
$p.SetContinuationForAwait = function Task_SetContinuationForAwait(continuationAction) { | |
if (this.get_IsCompleted()) | |
return; | |
if (this.m_continuationObject != null) | |
throw new System.Exception.ctor$1("Cannot add more than one continuation to a task"); | |
this.m_continuationObject = continuationAction; | |
}; | |
$p.Finish = function Task_Finish() { | |
this.isCompleted = true; | |
if (this.m_continuationObject != null) | |
this.m_continuationObject(); | |
}; | |
$p.ContinueWith$1 = function Task_ContinueWith(TResult, continuationFunction) { | |
if (this.isCompleted) | |
return $t.FromResult(TResult, continuationFunction(this)); | |
else | |
if (this.m_continuationObject == null) { | |
var result = new (System.Threading.Tasks.Task$1(TResult).ctor)(); | |
this.m_continuationObject = $d.delegate(function() { | |
result.TrySetResult(continuationFunction(this)); | |
}, this); | |
return result; | |
} | |
else { | |
var result = new (System.Threading.Tasks.Task$1(TResult).ctor)(); | |
var oldContinuation = this.m_continuationObject; | |
this.m_continuationObject = $d.delegate(function() { | |
oldContinuation(); | |
result.TrySetResult(continuationFunction(this)); | |
}, this); | |
return result; | |
} | |
}; | |
$p.ContinueWith = function Task_ContinueWith(continuationAction) { | |
if (this.isCompleted) | |
continuationAction(this); | |
else | |
if (this.m_continuationObject == null) | |
this.m_continuationObject = $d.delegate(function() { | |
continuationAction(this); | |
}, this); | |
else { | |
var oldContinuation = this.m_continuationObject; | |
this.m_continuationObject = $d.delegate(function() { | |
oldContinuation(); | |
continuationAction(this); | |
}, this); | |
} | |
return this; | |
}; | |
$p.ThrowIfExceptional = function Task_ThrowIfExceptional(includeTaskCanceledExceptions) { | |
var exception = this.GetExceptions(includeTaskCanceledExceptions); | |
if (exception != null) { | |
throw $d.signEx(exception); | |
} | |
}; | |
$p.GetExceptions = function Task_GetExceptions(includeTaskCanceledExceptions) { | |
if (this.exceptions != null && this.exceptions.get_Count() > 0) { | |
return new System.AggregateException.ctor$1(this.exceptions); | |
} | |
return null; | |
}; | |
$p.TrySetException = function Task_TrySetException(exceptionObject) { | |
var flag = false; | |
if (!this.get_IsCompleted()) { | |
this.exceptions = this.exceptions || new (System.Collections.Generic.List$1(System.Exception).ctor)(); | |
this.exceptions.Add(exceptionObject); | |
this.isFaulted = true; | |
this.Finish(); | |
flag = true; | |
} | |
return flag; | |
}; | |
$p.TrySetCanceled = function Task_TrySetCanceled(tokenToRecord) { | |
return this.TrySetCanceled$1(tokenToRecord, null); | |
}; | |
$p.TrySetCanceled$1 = function Task_TrySetCanceled(tokenToRecord, cancellationException) { | |
var flag = false; | |
if (!this.get_IsCompleted()) { | |
flag = true; | |
} | |
return flag; | |
}; | |
}); | |
System.Threading.Tasks.Task$1 = $d.declare("System.Threading.Tasks.Task`1", System.Threading.Tasks.Task, 256, $asm, function($t, $p, TResult) { | |
$t.$typeInfo = function(t, p) { return [1, [["m_result", TResult, 3]], [["TrySetResult", p.TrySetResult, 3], ["GetAwaiter", p.GetAwaiter$1, 6], ["ContinueWith", p.ContinueWith$2, 6], ["ContinueWith", p.ContinueWith$3, 6], ["get_Result", p.get_Result, 6]], [["ctor", t.ctor, 6], ["ctor$1", t.ctor$1, 6]], [["Result", TResult, 4]]]; }; | |
$t.$ator = function() { | |
this.m_result = $d.default(TResult); | |
}; | |
$t.ctor = function Task$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function Task$1(mResult) { | |
$t.$baseType.ctor.call(this); | |
this.m_result = mResult; | |
this.isCompleted = true; | |
}; | |
$t.ctor$1.prototype = $p; | |
$p.TrySetResult = function Task$1_TrySetResult(result) { | |
if (this.get_IsCompleted()) | |
return false; | |
this.m_result = result; | |
this.Finish(); | |
return true; | |
}; | |
$p.GetAwaiter$1 = function Task$1_GetAwaiter() { | |
return new (System.Runtime.CompilerServices.TaskAwaiter$1(TResult).ctor$1)(this); | |
}; | |
$p.ContinueWith$2 = function Task$1_ContinueWith(continuationAction) { | |
return $t.$baseType.prototype.ContinueWith.call(this, $d.delegate(function(task) { | |
continuationAction(this); | |
}, this)); | |
}; | |
$p.ContinueWith$3 = function Task$1_ContinueWith(TNewResult, continuationFunction) { | |
var task = new (System.Threading.Tasks.Task$1(TNewResult).ctor)(); | |
if (this.get_IsCompleted()) | |
task.TrySetResult(continuationFunction(this)); | |
else | |
if (this.m_continuationObject == null) | |
this.m_continuationObject = $d.delegate(function() { | |
task.TrySetResult(continuationFunction(this)); | |
}, this); | |
else { | |
var oldContinuation = this.m_continuationObject; | |
this.m_continuationObject = $d.delegate(function() { | |
oldContinuation(); | |
task.TrySetResult(continuationFunction(this)); | |
}, this); | |
} | |
return task; | |
}; | |
$p.get_Result = function Task$1_get_Result() { | |
return this.m_result; | |
}; | |
}, ["TResult"]); | |
System.Threading.Tasks.Shared$1 = $d.declare("System.Threading.Tasks.Shared`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$typeInfo = function(t, p) { return [0, [["Value", T, 3]], null, [["ctor", t.ctor, 3]]]; }; | |
$t.$ator = function() { | |
this.Value = $d.default(T); | |
}; | |
$t.ctor = function Shared$1(value) { | |
$t.$baseType.ctor.call(this); | |
this.Value = value; | |
}; | |
$t.ctor.prototype = $p; | |
}, ["T"]); | |
System.Threading.Tasks.TaskCompletionSource$1 = $d.declare("System.Threading.Tasks.TaskCompletionSource`1", System.Object, 256, $asm, function($t, $p, TResult) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Task", p.get_Task, 6], ["TrySetException", p.TrySetException$1, 6], ["TrySetException", p.TrySetException, 6], ["TrySetException", p.TrySetException$2, 3], ["SetException", p.SetException$1, 6], ["SetException", p.SetException, 6], ["TrySetResult", p.TrySetResult, 6], ["SetResult", p.SetResult, 6], ["TrySetCanceled", p.TrySetCanceled, 6], ["TrySetCanceled", p.TrySetCanceled$1, 3], ["SetCanceled", p.SetCanceled, 6]], [["ctor", t.ctor, 6]], [["Task", System.Threading.Tasks.Task$1(TResult), 0]]]; }; | |
$t.$ator = function() { | |
this.m_task = null; | |
}; | |
$t.ctor = function TaskCompletionSource$1() { | |
$t.$baseType.ctor.call(this); | |
this.m_task = new (System.Threading.Tasks.Task$1(TResult).ctor)(); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Task = function TaskCompletionSource$1_get_Task() { | |
return this.m_task; | |
}; | |
$p.TrySetException$1 = function TaskCompletionSource$1_TrySetException(exception) { | |
if (exception == null) | |
throw new System.ArgumentNullException.ctor$1("exception"); | |
return this.m_task.TrySetException(exception); | |
}; | |
$p.TrySetException = function TaskCompletionSource$1_TrySetException(exceptions) { | |
if (exceptions == null) | |
throw new System.ArgumentNullException.ctor$1("exceptions"); | |
var list = new (System.Collections.Generic.List$1(System.Exception).ctor)(); | |
var $iter = exceptions; | |
var $enumerator = $iter.System$Collections$IEnumerable$GetEnumerator(); | |
while ($enumerator.System$Collections$IEnumerator$MoveNext()) { | |
var exception = $enumerator.System$Collections$IEnumerator$get_Current(); | |
if (exception == null) | |
throw new System.ArgumentException.ctor$1("exception"); | |
list.Add(exception); | |
} | |
if (list.get_Count() == 0) | |
throw new System.ArgumentException.ctor$1("exceptions"); | |
return this.m_task.TrySetException(list); | |
}; | |
$p.TrySetException$2 = function TaskCompletionSource$1_TrySetException(exceptions) { | |
return this.m_task.TrySetException(exceptions); | |
}; | |
$p.SetException$1 = function TaskCompletionSource$1_SetException(exception) { | |
if (exception == null) | |
throw new System.ArgumentNullException.ctor$1("exception"); | |
if (!this.TrySetException$1(exception)) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
$p.SetException = function TaskCompletionSource$1_SetException(exceptions) { | |
if (!this.TrySetException(exceptions)) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
$p.TrySetResult = function TaskCompletionSource$1_TrySetResult(result) { | |
return this.m_task.TrySetResult(result); | |
}; | |
$p.SetResult = function TaskCompletionSource$1_SetResult(result) { | |
if (!this.TrySetResult(result)) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
$p.TrySetCanceled = function TaskCompletionSource$1_TrySetCanceled() { | |
return this.TrySetCanceled$1(new System.Threading.CancellationToken.ctor()); | |
}; | |
$p.TrySetCanceled$1 = function TaskCompletionSource$1_TrySetCanceled(tokenToRecord) { | |
return this.m_task.TrySetCanceled(tokenToRecord); | |
}; | |
$p.SetCanceled = function TaskCompletionSource$1_SetCanceled() { | |
if (!this.TrySetCanceled()) | |
throw new System.InvalidOperationException.ctor$1("TaskT_TransitionToFinal_AlreadyCompleted"); | |
}; | |
}, ["TResult"]); | |
System.TimeSpan = $d.declare("System.TimeSpan", null, 58, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, [["Zero", 58, 54], ["MaxValue", 58, 54], ["MinValue", 58, 54], ["TicksPerMillisecond", 47, 86, 10000], ["TicksPerSecond", 47, 86, 10000000], ["TicksPerMinute", 47, 86, 600000000], ["TicksPerHour", 47, 86, 36000000000], ["TicksPerDay", 47, 86, 864000000000], ["ticks", 47, 35]], [["FromTicks", t.FromTicks, 22], ["FromSeconds", t.FromSeconds, 22], ["FromHours", t.FromHours, 22], ["FromDays", t.FromDays, 22], ["FromMilliseconds", t.FromMilliseconds, 22], ["FromMinutes", t.FromMinutes, 22], ["get_Ticks", p.get_Ticks, 6], ["get_Days", p.get_Days, 6], ["get_Hours", p.get_Hours, 6], ["get_Milliseconds", p.get_Milliseconds, 6], ["get_Minutes", p.get_Minutes, 6], ["get_Seconds", p.get_Seconds, 6], ["get_TotalDays", p.get_TotalDays, 6], ["get_TotalHours", p.get_TotalHours, 6], ["get_TotalMilliseconds", p.get_TotalMilliseconds, 6], ["get_TotalMinutes", p.get_TotalMinutes, 6], ["get_TotalSeconds", p.get_TotalSeconds, 6], ["Add", p.Add, 6], ["Subtract", p.Subtract, 6], ["GetHashCode", p.GetHashCode, 6], ["Equals", t.Equals, 22], ["Equals", p.Equals$1, 6], ["Equals", p.Equals, 6], ["Duration", p.Duration, 6], ["CompareTo", p.CompareTo, 6], ["CompareTo", p.CompareTo$1, 6], ["Compare", t.Compare, 22], ["op_UnaryNegation", t.op_UnaryNegation, 22], ["op_Subtraction", t.op_Subtraction, 22], ["op_UnaryPlus", t.op_UnaryPlus, 22], ["op_Addition", t.op_Addition, 22], ["op_Equality", t.op_Equality, 22], ["op_Inequality", t.op_Inequality, 22], ["op_LessThan", t.op_LessThan, 22], ["op_LessThanOrEqual", t.op_LessThanOrEqual, 22], ["op_GreaterThan", t.op_GreaterThan, 22], ["op_GreaterThanOrEqual", t.op_GreaterThanOrEqual, 22], ["ToString", p.ToString, 6]], [["ctor$1", t.ctor$1, 6], ["ctor$2", t.ctor$2, 6], ["ctor$3", t.ctor$3, 6], ["ctor$4", t.ctor$4, 6], ["ctor", t.ctor, 6]], [["Ticks", 47, 6], ["Days", 45, 7], ["Hours", 45, 8], ["Milliseconds", 45, 9], ["Minutes", 45, 10], ["Seconds", 45, 11], ["TotalDays", 51, 12], ["TotalHours", 51, 13], ["TotalMilliseconds", 51, 14], ["TotalMinutes", 51, 15], ["TotalSeconds", 51, 16]]]; }; | |
$t.cctor = function() { | |
$t.Zero = new System.TimeSpan.ctor$1(0); | |
$t.MaxValue = new System.TimeSpan.ctor$1(9007199254740991); | |
$t.MinValue = new System.TimeSpan.ctor$1(-9007199254740991); | |
$t.TicksPerMillisecond = 10000; | |
$t.TicksPerSecond = 10000000; | |
$t.TicksPerMinute = 600000000; | |
$t.TicksPerHour = 36000000000; | |
$t.TicksPerDay = 864000000000; | |
$t.HoursPerDay = 24; | |
$t.MinutesPerHour = 60; | |
$t.SecondsPerMinute = 60; | |
$t.MillisecondsPerSecond = 1000; | |
}; | |
$t.ctor = function TimeSpan() { | |
this.ticks = 0; | |
}; | |
$t.ctor.prototype = $p; | |
$t.ctor$1 = function TimeSpan(ticks) { | |
$t.ctor.call(this); | |
this.ticks = ticks; | |
}; | |
$t.ctor$1.prototype = $p; | |
$t.ctor$2 = function TimeSpan(hours, minutes, seconds) { | |
this.ticks = hours * 36000000000 + minutes * 600000000 + seconds * 10000000; | |
}; | |
$t.ctor$2.prototype = $p; | |
$t.ctor$3 = function TimeSpan(days, hours, minutes, seconds) { | |
this.ticks = days * 864000000000 + hours * 36000000000 + minutes * 600000000 + seconds * 10000000; | |
}; | |
$t.ctor$3.prototype = $p; | |
$t.ctor$4 = function TimeSpan(days, hours, minutes, seconds, milliseconds) { | |
this.ticks = days * 864000000000 + hours * 36000000000 + minutes * 600000000 + seconds * 10000000 + milliseconds * 10000; | |
}; | |
$t.ctor$4.prototype = $p; | |
$t.FromTicks = function TimeSpan_FromTicks(value) { | |
return new System.TimeSpan.ctor$1(value); | |
}; | |
$t.FromSeconds = function TimeSpan_FromSeconds(value) { | |
return new System.TimeSpan.ctor$1(((value * 10000000) | 0)); | |
}; | |
$t.FromHours = function TimeSpan_FromHours(value) { | |
return new System.TimeSpan.ctor$1(((value * 36000000000) | 0)); | |
}; | |
$t.FromDays = function TimeSpan_FromDays(value) { | |
return new System.TimeSpan.ctor$1(((value * 864000000000) | 0)); | |
}; | |
$t.FromMilliseconds = function TimeSpan_FromMilliseconds(value) { | |
return new System.TimeSpan.ctor$1(((value * 10000) | 0)); | |
}; | |
$t.FromMinutes = function TimeSpan_FromMinutes(value) { | |
return new System.TimeSpan.ctor$1(((value * 600000000) | 0)); | |
}; | |
$p.get_Ticks = function TimeSpan_get_Ticks() { | |
return this.ticks; | |
}; | |
$p.get_Days = function TimeSpan_get_Days() { | |
return ((this.ticks / 864000000000 | 0) | 0); | |
}; | |
$p.get_Hours = function TimeSpan_get_Hours() { | |
return (((this.ticks / 864000000000 | 0) % 24) | 0); | |
}; | |
$p.get_Milliseconds = function TimeSpan_get_Milliseconds() { | |
return (((this.ticks / 10000 | 0) % 1000) | 0); | |
}; | |
$p.get_Minutes = function TimeSpan_get_Minutes() { | |
return (((this.ticks / 600000000 | 0) % 60) | 0); | |
}; | |
$p.get_Seconds = function TimeSpan_get_Seconds() { | |
return (((this.ticks / 10000000 | 0) % 60) | 0); | |
}; | |
$p.get_TotalDays = function TimeSpan_get_TotalDays() { | |
return this.ticks / 864000000000; | |
}; | |
$p.get_TotalHours = function TimeSpan_get_TotalHours() { | |
return this.ticks / 36000000000; | |
}; | |
$p.get_TotalMilliseconds = function TimeSpan_get_TotalMilliseconds() { | |
return this.ticks / 10000; | |
}; | |
$p.get_TotalMinutes = function TimeSpan_get_TotalMinutes() { | |
return this.ticks / 600000000; | |
}; | |
$p.get_TotalSeconds = function TimeSpan_get_TotalSeconds() { | |
return this.ticks / 10000000; | |
}; | |
$p.Add = function TimeSpan_Add(ts) { | |
var ticks = this.ticks + ts.ticks; | |
return new System.TimeSpan.ctor$1(ticks); | |
}; | |
$p.Subtract = function TimeSpan_Subtract(ts) { | |
return new System.TimeSpan.ctor$1(this.ticks - ts.ticks); | |
}; | |
$p.GetHashCode = function TimeSpan_GetHashCode() { | |
return (this.ticks | 0) ^ ((this.ticks >> 32) | 0); | |
}; | |
$t.Equals = function TimeSpan_Equals(t1, t2) { | |
return t1.ticks == t2.ticks; | |
}; | |
$p.Equals$1 = function TimeSpan_Equals(obj) { | |
return this.ticks == obj.ticks; | |
}; | |
$p.Equals = function TimeSpan_Equals(value) { | |
if ($d.is(value, System.TimeSpan)) | |
return this.ticks == ($d.cast(value, System.TimeSpan)).ticks; | |
else | |
return false; | |
}; | |
$p.Duration = function TimeSpan_Duration() { | |
return new System.TimeSpan.ctor$1(this.ticks >= 0 ? this.ticks : -this.ticks); | |
}; | |
$p.CompareTo = function TimeSpan_CompareTo(value) { | |
var num = value.ticks; | |
if (this.ticks > num) | |
return 1; | |
return this.ticks < num ? -1 : 0; | |
}; | |
$p.CompareTo$1 = function TimeSpan_CompareTo(value) { | |
if (value == null) | |
return 1; | |
if (!($d.is(value, System.TimeSpan))) | |
throw new System.ArgumentException.ctor$1("Argument must be a TimeSpan"); | |
var num = ($d.cast(value, System.TimeSpan)).ticks; | |
if (this.ticks > num) | |
return 1; | |
return this.ticks < num ? -1 : 0; | |
}; | |
$t.Compare = function TimeSpan_Compare(t1, t2) { | |
if (t1.ticks > t2.ticks) | |
return 1; | |
return t1.ticks < t2.ticks ? -1 : 0; | |
}; | |
$t.op_UnaryNegation = function TimeSpan_op_UnaryNegation(t) { | |
return new System.TimeSpan.ctor$1(-t.ticks); | |
}; | |
$t.op_Subtraction = function TimeSpan_op_Subtraction(t1, t2) { | |
return t1.Subtract(t2); | |
}; | |
$t.op_UnaryPlus = function TimeSpan_op_UnaryPlus(t) { | |
return t; | |
}; | |
$t.op_Addition = function TimeSpan_op_Addition(t1, t2) { | |
return t1.Add(t2); | |
}; | |
$t.op_Equality = function TimeSpan_op_Equality(t1, t2) { | |
return t2 != null && t1.ticks == t2.ticks; | |
}; | |
$t.op_Inequality = function TimeSpan_op_Inequality(t1, t2) { | |
return t2 != null && t1.ticks != t2.ticks; | |
}; | |
$t.op_LessThan = function TimeSpan_op_LessThan(t1, t2) { | |
return t1.ticks < t2.ticks; | |
}; | |
$t.op_LessThanOrEqual = function TimeSpan_op_LessThanOrEqual(t1, t2) { | |
return t1.ticks <= t2.ticks; | |
}; | |
$t.op_GreaterThan = function TimeSpan_op_GreaterThan(t1, t2) { | |
return t1.ticks > t2.ticks; | |
}; | |
$t.op_GreaterThanOrEqual = function TimeSpan_op_GreaterThanOrEqual(t1, t2) { | |
return t1.ticks >= t2.ticks; | |
}; | |
$p.ToString = function TimeSpan_ToString() { | |
var builder = new System.Text.StringBuilder.ctor(); | |
if (this.get_Days() > 0) | |
builder.Append$12($d.toString(this.get_Days()) + "."); | |
if (this.get_Hours() < 10) | |
builder.Append$12("0"); | |
builder.Append$7(this.get_Hours()); | |
if (this.get_Minutes() < 10) | |
builder.Append$12("0"); | |
builder.Append$7(this.get_Minutes()); | |
if (this.get_Seconds() < 10) | |
builder.Append$12("0"); | |
builder.Append$7(this.get_Seconds()); | |
if (this.get_Milliseconds() > 0) { | |
builder.Append$12("."); | |
if (this.get_Milliseconds() < 100) | |
builder.Append$12("0"); | |
if (this.get_Milliseconds() < 10) | |
builder.Append$12("0"); | |
builder.Append$7(this.get_Milliseconds()); | |
} | |
var remainingTicks = this.get_Ticks() % 10000; | |
if (remainingTicks > 0) { | |
if (remainingTicks < 1000) | |
builder.Append$12("0"); | |
if (remainingTicks < 100) | |
builder.Append$12("0"); | |
if (remainingTicks < 10) | |
builder.Append$12("0"); | |
builder.Append$8(remainingTicks); | |
} | |
return builder.toString(); | |
}; | |
}); | |
System.Tuple = $d.declare("System.Tuple", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["Create", t.Create, 22], ["Create", t.Create$1, 22], ["Create", t.Create$2, 22], ["Create", t.Create$3, 22], ["Create", t.Create$4, 22], ["Create", t.Create$5, 22], ["Create", t.Create$6, 22], ["Create", t.Create$7, 22], ["CombineHashCodes", t.CombineHashCodes, 19], ["CombineHashCodes", t.CombineHashCodes$1, 19], ["CombineHashCodes", t.CombineHashCodes$2, 19], ["CombineHashCodes", t.CombineHashCodes$3, 19], ["CombineHashCodes", t.CombineHashCodes$4, 19], ["CombineHashCodes", t.CombineHashCodes$5, 19], ["CombineHashCodes", t.CombineHashCodes$6, 19]]]; }; | |
$t.Create = function Tuple_Create(T1, item1) { | |
return new (System.Tuple$1(T1).ctor)(item1); | |
}; | |
$t.Create$1 = function Tuple_Create(T1, T2, item1, item2) { | |
return new (System.Tuple$2(T1, T2).ctor)(item1, item2); | |
}; | |
$t.Create$2 = function Tuple_Create(T1, T2, T3, item1, item2, item3) { | |
return new (System.Tuple$3(T1, T2, T3).ctor)(item1, item2, item3); | |
}; | |
$t.Create$3 = function Tuple_Create(T1, T2, T3, T4, item1, item2, item3, item4) { | |
return new (System.Tuple$4(T1, T2, T3, T4).ctor)(item1, item2, item3, item4); | |
}; | |
$t.Create$4 = function Tuple_Create(T1, T2, T3, T4, T5, item1, item2, item3, item4, item5) { | |
return new (System.Tuple$5(T1, T2, T3, T4, T5).ctor)(item1, item2, item3, item4, item5); | |
}; | |
$t.Create$5 = function Tuple_Create(T1, T2, T3, T4, T5, T6, item1, item2, item3, item4, item5, item6) { | |
return new (System.Tuple$6(T1, T2, T3, T4, T5, T6).ctor)(item1, item2, item3, item4, item5, item6); | |
}; | |
$t.Create$6 = function Tuple_Create(T1, T2, T3, T4, T5, T6, T7, item1, item2, item3, item4, item5, item6, item7) { | |
return new (System.Tuple$7(T1, T2, T3, T4, T5, T6, T7).ctor)(item1, item2, item3, item4, item5, | |
item6, item7); | |
}; | |
$t.Create$7 = function Tuple_Create(T1, T2, T3, T4, T5, T6, T7, T8, item1, item2, item3, item4, item5, item6, item7, item8) { | |
return new (System.Tuple$8(T1, T2, T3, T4, T5, T6, T7, System.Tuple$1(T8)).ctor)(item1, item2, | |
item3, item4, item5, item6, item7, new (System.Tuple$1(T8).ctor)(item8)); | |
}; | |
$t.CombineHashCodes = function Tuple_CombineHashCodes(h1, h2) { | |
return (h1 << 5) + h1 ^ h2; | |
}; | |
$t.CombineHashCodes$1 = function Tuple_CombineHashCodes(h1, h2, h3) { | |
return $t.CombineHashCodes($t.CombineHashCodes(h1, h2), h3); | |
}; | |
$t.CombineHashCodes$2 = function Tuple_CombineHashCodes(h1, h2, h3, h4) { | |
return $t.CombineHashCodes($t.CombineHashCodes(h1, h2), $t.CombineHashCodes(h3, h4)); | |
}; | |
$t.CombineHashCodes$3 = function Tuple_CombineHashCodes(h1, h2, h3, h4, h5) { | |
return $t.CombineHashCodes($t.CombineHashCodes$2(h1, h2, h3, h4), h5); | |
}; | |
$t.CombineHashCodes$4 = function Tuple_CombineHashCodes(h1, h2, h3, h4, h5, h6) { | |
return $t.CombineHashCodes($t.CombineHashCodes$2(h1, h2, h3, h4), $t.CombineHashCodes(h5, h6)); | |
}; | |
$t.CombineHashCodes$5 = function Tuple_CombineHashCodes(h1, h2, h3, h4, h5, h6, h7) { | |
return $t.CombineHashCodes($t.CombineHashCodes$2(h1, h2, h3, h4), $t.CombineHashCodes$1(h5, h6, | |
h7)); | |
}; | |
$t.CombineHashCodes$6 = function Tuple_CombineHashCodes(h1, h2, h3, h4, h5, h6, h7, h8) { | |
return $t.CombineHashCodes($t.CombineHashCodes$2(h1, h2, h3, h4), $t.CombineHashCodes$2(h5, h6, | |
h7, h8)); | |
}; | |
}); | |
System.ITuple = $d.declare("System.ITuple", null, 66, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [160, null, [["ToString", null, 6], ["GetHashCode", null, 6]], null, [["Size", 45]]]; }; | |
}); | |
System.Tuple$1 = $d.declare("System.Tuple`1", System.Object, 256, $asm, function($t, $p, T1) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
}; | |
$p.get_Item1 = function Tuple$1_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$1_System$ITuple$get_Size() { | |
return 1; | |
}; | |
$t.ctor = function Tuple$1(item1) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$1_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
System.Collections.Generic.EqualityComparer$1(System.Object).get_Default()); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$1_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$1(T1)); | |
if (tuple == null) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$1_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$1_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$1(T1)); | |
if (tuple != null) | |
return comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
}; | |
$p.GetHashCode = function Tuple$1_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$1_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$1_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$1_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$1_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(")"); | |
return sb.toString(); | |
}; | |
}, ["T1"]); | |
System.Tuple$2 = $d.declare("System.Tuple`2", System.Object, 256, $asm, function($t, $p, T1, T2) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
}; | |
$p.get_Item1 = function Tuple$2_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$2_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$2_System$ITuple$get_Size() { | |
return 2; | |
}; | |
$t.ctor = function Tuple$2(item1, item2) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$2_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$2_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$2(T1, T2)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1)) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, tuple.m_Item2); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$2_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$2_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$2(T1, T2)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num != 0) | |
return num; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
} | |
}; | |
$p.GetHashCode = function Tuple$2_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$2_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$2_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$2_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$2_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2"]); | |
System.Tuple$3 = $d.declare("System.Tuple`3", System.Object, 256, $asm, function($t, $p, T1, T2, T3) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
}; | |
$p.get_Item1 = function Tuple$3_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$3_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$3_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$3_System$ITuple$get_Size() { | |
return 3; | |
}; | |
$t.ctor = function Tuple$3(item1, item2, item3) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$3_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$3_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$3(T1, T2, T3)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2)) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$3_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$3_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$3(T1, T2, T3)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
} | |
}; | |
$p.GetHashCode = function Tuple$3_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$3_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes$1(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$3_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$3_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$3_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2", "T3"]); | |
System.Tuple$4 = $d.declare("System.Tuple`4", System.Object, 256, $asm, function($t, $p, T1, T2, T3, T4) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["get_Item4", p.get_Item4, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2], ["Item4", T4, 3]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
this.m_Item4 = $d.default(T4); | |
}; | |
$p.get_Item1 = function Tuple$4_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$4_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$4_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.get_Item4 = function Tuple$4_get_Item4() { | |
return this.m_Item4; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$4_System$ITuple$get_Size() { | |
return 4; | |
}; | |
$t.ctor = function Tuple$4(item1, item2, item3, item4) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$4_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$4_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$4(T1, T2, T3, T4)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3))) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item4, tuple.m_Item4); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$4_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$4_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$4(T1, T2, T3, T4)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
var num3 = comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item4, tuple.m_Item4); | |
} | |
}; | |
$p.GetHashCode = function Tuple$4_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$4_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes$2(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$4_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$4_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$4_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item4); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2", "T3", "T4"]); | |
System.Tuple$5 = $d.declare("System.Tuple`5", System.Object, 256, $asm, function($t, $p, T1, T2, T3, T4, T5) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["get_Item4", p.get_Item4, 6], ["get_Item5", p.get_Item5, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2], ["Item4", T4, 3], ["Item5", T5, 4]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
this.m_Item4 = $d.default(T4); | |
this.m_Item5 = $d.default(T5); | |
}; | |
$p.get_Item1 = function Tuple$5_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$5_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$5_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.get_Item4 = function Tuple$5_get_Item4() { | |
return this.m_Item4; | |
}; | |
$p.get_Item5 = function Tuple$5_get_Item5() { | |
return this.m_Item5; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$5_System$ITuple$get_Size() { | |
return 5; | |
}; | |
$t.ctor = function Tuple$5(item1, item2, item3, item4, item5) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$5_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$5_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$5(T1, T2, T3, T4, T5)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3)) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item4, | |
tuple.m_Item4)) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item5, tuple.m_Item5); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$5_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$5_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$5(T1, T2, T3, T4, T5)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
var num3 = comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
var num4 = comparer.System$Collections$IComparer$Compare(this.m_Item4, tuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item5, tuple.m_Item5); | |
} | |
}; | |
$p.GetHashCode = function Tuple$5_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$5_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes$3(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$5_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$5_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$5_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item4); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item5); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2", "T3", "T4", "T5"]); | |
System.Tuple$6 = $d.declare("System.Tuple`6", System.Object, 256, $asm, function($t, $p, T1, T2, T3, T4, T5, T6) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["get_Item4", p.get_Item4, 6], ["get_Item5", p.get_Item5, 6], ["get_Item6", p.get_Item6, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2], ["Item4", T4, 3], ["Item5", T5, 4], ["Item6", T6, 5]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
this.m_Item4 = $d.default(T4); | |
this.m_Item5 = $d.default(T5); | |
this.m_Item6 = $d.default(T6); | |
}; | |
$p.get_Item1 = function Tuple$6_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$6_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$6_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.get_Item4 = function Tuple$6_get_Item4() { | |
return this.m_Item4; | |
}; | |
$p.get_Item5 = function Tuple$6_get_Item5() { | |
return this.m_Item5; | |
}; | |
$p.get_Item6 = function Tuple$6_get_Item6() { | |
return this.m_Item6; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$6_System$ITuple$get_Size() { | |
return 6; | |
}; | |
$t.ctor = function Tuple$6(item1, item2, item3, item4, item5, item6) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$6_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$6_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$6(T1, T2, T3, T4, T5, T6)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3)) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item4, | |
tuple.m_Item4) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item5, tuple.m_Item5))) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item6, tuple.m_Item6); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$6_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$6_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$6(T1, T2, T3, T4, T5, T6)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
var num3 = comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
var num4 = comparer.System$Collections$IComparer$Compare(this.m_Item4, tuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
var num5 = comparer.System$Collections$IComparer$Compare(this.m_Item5, tuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item6, tuple.m_Item6); | |
} | |
}; | |
$p.GetHashCode = function Tuple$6_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$6_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes$4(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$6_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$6_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$6_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item4); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item5); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item6); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6"]); | |
System.Tuple$7 = $d.declare("System.Tuple`7", System.Object, 256, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["get_Item4", p.get_Item4, 6], ["get_Item5", p.get_Item5, 6], ["get_Item6", p.get_Item6, 6], ["get_Item7", p.get_Item7, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2], ["Item4", T4, 3], ["Item5", T5, 4], ["Item6", T6, 5], ["Item7", T7, 6]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
this.m_Item4 = $d.default(T4); | |
this.m_Item5 = $d.default(T5); | |
this.m_Item6 = $d.default(T6); | |
this.m_Item7 = $d.default(T7); | |
}; | |
$p.get_Item1 = function Tuple$7_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$7_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$7_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.get_Item4 = function Tuple$7_get_Item4() { | |
return this.m_Item4; | |
}; | |
$p.get_Item5 = function Tuple$7_get_Item5() { | |
return this.m_Item5; | |
}; | |
$p.get_Item6 = function Tuple$7_get_Item6() { | |
return this.m_Item6; | |
}; | |
$p.get_Item7 = function Tuple$7_get_Item7() { | |
return this.m_Item7; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$7_System$ITuple$get_Size() { | |
return 7; | |
}; | |
$t.ctor = function Tuple$7(item1, item2, item3, item4, item5, item6, item7) { | |
$t.$baseType.ctor.call(this); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
this.m_Item7 = item7; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$7_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$7_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$7(T1, T2, T3, T4, T5, T6, T7)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3)) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item4, | |
tuple.m_Item4) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item5, tuple.m_Item5) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item6, | |
tuple.m_Item6))) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Item7, tuple.m_Item7); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$7_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$7_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$7(T1, T2, T3, T4, T5, T6, T7)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
var num3 = comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
var num4 = comparer.System$Collections$IComparer$Compare(this.m_Item4, tuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
var num5 = comparer.System$Collections$IComparer$Compare(this.m_Item5, tuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
var num6 = comparer.System$Collections$IComparer$Compare(this.m_Item6, tuple.m_Item6); | |
if (num6 != 0) | |
return num6; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Item7, tuple.m_Item7); | |
} | |
}; | |
$p.GetHashCode = function Tuple$7_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$7_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
return System.Tuple.CombineHashCodes$5(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7)); | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$7_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$7_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$7_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item4); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item5); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item6); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item7); | |
sb.Append$12(")"); | |
return (sb).toString(); | |
}; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7"]); | |
System.Tuple$8 = $d.declare("System.Tuple`8", System.Object, 256, $asm, function($t, $p, T1, T2, T3, T4, T5, T6, T7, TRest) { | |
$t.$intfs = [System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, System.ITuple]; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Item1", p.get_Item1, 6], ["get_Item2", p.get_Item2, 6], ["get_Item3", p.get_Item3, 6], ["get_Item4", p.get_Item4, 6], ["get_Item5", p.get_Item5, 6], ["get_Item6", p.get_Item6, 6], ["get_Item7", p.get_Item7, 6], ["get_Rest", p.get_Rest, 6], ["Equals", p.Equals, 6], ["GetHashCode", p.GetHashCode, 6], ["ToString", p.ToString, 6]], [["ctor", t.ctor, 6]], [["Item1", T1, 0], ["Item2", T2, 1], ["Item3", T3, 2], ["Item4", T4, 3], ["Item5", T5, 4], ["Item6", T6, 5], ["Item7", T7, 6], ["Rest", TRest, 7]]]; }; | |
$t.$ator = function() { | |
this.m_Item1 = $d.default(T1); | |
this.m_Item2 = $d.default(T2); | |
this.m_Item3 = $d.default(T3); | |
this.m_Item4 = $d.default(T4); | |
this.m_Item5 = $d.default(T5); | |
this.m_Item6 = $d.default(T6); | |
this.m_Item7 = $d.default(T7); | |
this.m_Rest = $d.default(TRest); | |
}; | |
$p.get_Item1 = function Tuple$8_get_Item1() { | |
return this.m_Item1; | |
}; | |
$p.get_Item2 = function Tuple$8_get_Item2() { | |
return this.m_Item2; | |
}; | |
$p.get_Item3 = function Tuple$8_get_Item3() { | |
return this.m_Item3; | |
}; | |
$p.get_Item4 = function Tuple$8_get_Item4() { | |
return this.m_Item4; | |
}; | |
$p.get_Item5 = function Tuple$8_get_Item5() { | |
return this.m_Item5; | |
}; | |
$p.get_Item6 = function Tuple$8_get_Item6() { | |
return this.m_Item6; | |
}; | |
$p.get_Item7 = function Tuple$8_get_Item7() { | |
return this.m_Item7; | |
}; | |
$p.get_Rest = function Tuple$8_get_Rest() { | |
return this.m_Rest; | |
}; | |
$p.System$ITuple$get_Size = function Tuple$8_System$ITuple$get_Size() { | |
return 7 + ($d.cast(this.m_Rest, System.ITuple)).System$ITuple$get_Size(); | |
}; | |
$t.ctor = function Tuple$8(item1, item2, item3, item4, item5, item6, item7, rest) { | |
$t.$baseType.ctor.call(this); | |
if (!($d.is(rest, System.ITuple))) | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleLastArgumentNotATuple"); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
this.m_Item7 = item7; | |
this.m_Rest = rest; | |
}; | |
$t.ctor.prototype = $p; | |
$p.Equals = function Tuple$8_Equals(obj) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$Equals(obj, | |
$d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$Equals = function Tuple$8_System_Collections_IStructuralEquatable_Equals(other, comparer) { | |
if (other == null) | |
return false; | |
var tuple = $d.as(other, System.Tuple$8(T1, T2, T3, T4, T5, T6, T7, TRest)); | |
if (tuple == null || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item1, tuple.m_Item1) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item2, | |
tuple.m_Item2) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item3, tuple.m_Item3)) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item4, | |
tuple.m_Item4) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item5, tuple.m_Item5) || (!comparer.System$Collections$IEqualityComparer$Equals(this.m_Item6, | |
tuple.m_Item6) || !comparer.System$Collections$IEqualityComparer$Equals(this.m_Item7, tuple.m_Item7)))) | |
return false; | |
else | |
return comparer.System$Collections$IEqualityComparer$Equals(this.m_Rest, tuple.m_Rest); | |
}; | |
$p.System$IComparable$CompareTo = function Tuple$8_System_IComparable_CompareTo(obj) { | |
return ($d.cast(this, System.Collections.IStructuralComparable)).System$Collections$IStructuralComparable$CompareTo(obj, | |
$d.cast(System.Collections.Generic.Comparer$1(System.Object).get_Default(), System.Collections.IComparer)); | |
}; | |
$p.System$Collections$IStructuralComparable$CompareTo = function Tuple$8_System_Collections_IStructuralComparable_CompareTo(other, comparer) { | |
if (other == null) | |
return 1; | |
var tuple = $d.as(other, System.Tuple$8(T1, T2, T3, T4, T5, T6, T7, TRest)); | |
if (tuple == null) { | |
throw new System.ArgumentException.ctor$1("ArgumentException_TupleIncorrectType"); | |
} | |
else { | |
var num1 = comparer.System$Collections$IComparer$Compare(this.m_Item1, tuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
var num2 = comparer.System$Collections$IComparer$Compare(this.m_Item2, tuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
var num3 = comparer.System$Collections$IComparer$Compare(this.m_Item3, tuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
var num4 = comparer.System$Collections$IComparer$Compare(this.m_Item4, tuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
var num5 = comparer.System$Collections$IComparer$Compare(this.m_Item5, tuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
var num6 = comparer.System$Collections$IComparer$Compare(this.m_Item6, tuple.m_Item6); | |
if (num6 != 0) | |
return num6; | |
var num7 = comparer.System$Collections$IComparer$Compare(this.m_Item7, tuple.m_Item7); | |
if (num7 != 0) | |
return num7; | |
else | |
return comparer.System$Collections$IComparer$Compare(this.m_Rest, tuple.m_Rest); | |
} | |
}; | |
$p.GetHashCode = function Tuple$8_GetHashCode() { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode($d.cast(System.Collections.Generic.EqualityComparer$1(System.Object).get_Default(), | |
System.Collections.IEqualityComparer)); | |
}; | |
$p.System$Collections$IStructuralEquatable$GetHashCode = function Tuple$8_System_Collections_IStructuralEquatable_GetHashCode(comparer) { | |
var tuple = $d.cast(this.m_Rest, System.ITuple); | |
if (tuple.System$ITuple$get_Size() >= 8) | |
return tuple.System$ITuple$GetHashCode(comparer); | |
switch (8 - tuple.System$ITuple$get_Size()) { | |
case 1: | |
return System.Tuple.CombineHashCodes(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), | |
tuple.System$ITuple$GetHashCode(comparer)); | |
case 2: | |
return System.Tuple.CombineHashCodes$1(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), tuple.System$ITuple$GetHashCode(comparer)); | |
case 3: | |
return System.Tuple.CombineHashCodes$2(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), | |
tuple.System$ITuple$GetHashCode(comparer)); | |
case 4: | |
return System.Tuple.CombineHashCodes$3(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), tuple.System$ITuple$GetHashCode(comparer)); | |
case 5: | |
return System.Tuple.CombineHashCodes$4(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), | |
tuple.System$ITuple$GetHashCode(comparer)); | |
case 6: | |
return System.Tuple.CombineHashCodes$5(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), tuple.System$ITuple$GetHashCode(comparer)); | |
case 7: | |
return System.Tuple.CombineHashCodes$6(comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item1), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item2), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item3), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item4), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item5), | |
comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item6), comparer.System$Collections$IEqualityComparer$GetHashCode(this.m_Item7), | |
tuple.System$ITuple$GetHashCode(comparer)); | |
default: | |
return -1; | |
} | |
}; | |
$p.System$ITuple$GetHashCode = function Tuple$8_System_ITuple_GetHashCode(comparer) { | |
return ($d.cast(this, System.Collections.IStructuralEquatable)).System$Collections$IStructuralEquatable$GetHashCode(comparer); | |
}; | |
$p.ToString = function Tuple$8_ToString() { | |
var sb = new System.Text.StringBuilder.ctor(); | |
sb.Append$12("("); | |
return ($d.cast(this, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
$p.System$ITuple$ToString = function Tuple$8_System_ITuple_ToString(sb) { | |
sb.Append$9(this.m_Item1); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item2); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item3); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item4); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item5); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item6); | |
sb.Append$12(", "); | |
sb.Append$9(this.m_Item7); | |
sb.Append$12(", "); | |
return ($d.cast(this.m_Rest, System.ITuple)).System$ITuple$ToString(sb); | |
}; | |
}, ["T1", "T2", "T3", "T4", "T5", "T6", "T7", "TRest"]); | |
System.Type = $d.declare("System.Type", System.Reflection.MemberInfo, 27, $asm, function($t, $p) { | |
$t.$intfs = [System.Reflection.ICustomAttributeProvider]; | |
$t.$typeInfo = function(t, p) { return [1, [["EmptyTypes", 155, 54], ["DefaultBinder", System.Reflection.Binder, 54], ["typeAttributes", System.Reflection.TypeAttributes, 35], ["fields", $d.arrayType(System.Reflection.FieldInfo), 35], ["methods", $d.arrayType(System.Reflection.MethodInfo), 35], ["constructors", $d.arrayType(System.Reflection.ConstructorInfo), 35], ["properties", $d.arrayType(System.Reflection.PropertyInfo), 35], ["events", $d.arrayType(System.Reflection.EventInfo), 35]], [["Create", t.Create, 19], ["CreateEnum", t.CreateEnum, 19], ["TryConstruct", t.TryConstruct, 19], ["get_MemberType", p.get_MemberType, 6], ["get_BaseType", p.get_BaseType, 6], ["get_Assembly", p.get_Assembly, 6], ["get_AssemblyQualifiedName", p.get_AssemblyQualifiedName, 6], ["get_FullName", p.get_FullName, 6], ["GetType", t.GetType, 22], ["GetElementType", p.GetElementType, 6], ["IsAssignableFrom", p.IsAssignableFrom, 6], ["IsInstanceOfType", p.IsInstanceOfType, 6], ["GetInterfaces", p.GetInterfaces, 6], ["GetProperties", p.GetProperties, 6], ["GetEvents", p.GetEvents, 6], ["GetEvent", p.GetEvent, 6], ["GetMethods", p.GetMethods, 6], ["GetMethod", p.GetMethod$2, 6], ["GetMethod", p.GetMethod$1, 6], ["GetMethod", p.GetMethod, 6], ["GetProperty", p.GetProperty$6, 6], ["GetProperty", p.GetProperty$5, 6], ["GetProperty", p.GetProperty$1, 6], ["GetProperty", p.GetProperty$4, 6], ["GetProperty", p.GetProperty$3, 6], ["GetProperty", p.GetProperty$2, 6], ["GetProperty", p.GetProperty$7, 3], ["GetProperty", p.GetProperty, 6], ["GetPropertyImpl", p.GetPropertyImpl, 4], ["GetConstructors", p.GetConstructors, 6], ["GetField", p.GetField$1, 6], ["GetField", p.GetField, 6], ["GetFields", p.GetFields, 6], ["GetFields", p.GetFields$1, 6], ["get_IsValueType", p.get_IsValueType, 6], ["GetArrayRank", p.GetArrayRank, 6], ["GetConstructor", p.GetConstructor$2, 6], ["GetConstructor", p.GetConstructor$1, 6], ["GetConstructor", p.GetConstructor, 6], ["GetConstructorImpl", p.GetConstructorImpl, 4], ["GetEnumNames", p.GetEnumNames, 6], ["GetEnumValues", p.GetEnumValues, 6], ["GetEnumUnderlyingType", p.GetEnumUnderlyingType, 6], ["MakeArrayType", p.MakeArrayType, 6], ["MakeArrayType", p.MakeArrayType$1, 6], ["get_Attributes", p.get_Attributes, 6], ["get_IsPrimitive", p.get_IsPrimitive, 6], ["get_IsAbstract", p.get_IsAbstract, 6], ["get_IsEnum", p.get_IsEnum, 6], ["get_IsInterface", p.get_IsInterface, 6], ["get_IsSealed", p.get_IsSealed, 6], ["get_IsGenericType", p.get_IsGenericType, 6], ["GetGenericTypeDefinition", p.GetGenericTypeDefinition, 6], ["MakeGenericType", p.MakeGenericType, 6], ["get_GenericTypeArguments", p.get_GenericTypeArguments, 6], ["GetGenericArguments", p.GetGenericArguments, 6], ["get_IsArray", p.get_IsArray, 6], ["get_IsTypedArrayCompatible", p.get_IsTypedArrayCompatible, 6], ["get_IsGenericTypeDefinition", p.get_IsGenericTypeDefinition, 6], ["ToString", p.ToString, 6], ["get_IsGenericParameter", p.get_IsGenericParameter, 6], ["get_HasElementType", p.get_HasElementType, 6], ["get_IsNested", p.get_IsNested, 6], ["get_IsNestedPublic", p.get_IsNestedPublic, 6], ["get_IsVisible", p.get_IsVisible, 6], ["get_IsPublic", p.get_IsPublic, 6], ["get_TypeKind", p.get_TypeKind, 3]], [["ctor", t.ctor, 6]], [["MemberType", System.Reflection.MemberTypes, 3], ["BaseType", 27, 4], ["Assembly", System.Reflection.Assembly, 5], ["AssemblyQualifiedName", 20, 6], ["FullName", 20, 7], ["IsValueType", 39, 34], ["Attributes", System.Reflection.TypeAttributes, 45], ["IsPrimitive", 39, 46], ["IsAbstract", 39, 47], ["IsEnum", 39, 48], ["IsInterface", 39, 49], ["IsSealed", 39, 50], ["IsGenericType", 39, 51], ["GenericTypeArguments", 155, 54], ["IsArray", 39, 56], ["IsTypedArrayCompatible", 39, 57], ["IsGenericTypeDefinition", 39, 58], ["IsGenericParameter", 39, 60], ["HasElementType", 39, 61], ["IsNested", 39, 62], ["IsNestedPublic", 39, 63], ["IsVisible", 39, 64], ["IsPublic", 39, 65], ["TypeKind", 45, 66]]]; }; | |
$t.cctor = function() { | |
$t.EncodedTypes = null; | |
$t.EmptyTypes = $d.array(System.Type, 0); | |
$t.DefaultBinder = new System.Reflection.Binder.ctor(); | |
$t.EmptyFields = $d.array(System.Reflection.FieldInfo, 0); | |
$t.EmptyMethods = $d.array(System.Reflection.MethodInfo, 0); | |
$t.EmptyConstructors = $d.array(System.Reflection.ConstructorInfo, 0); | |
$t.EmptyProperties = $d.array(System.Reflection.PropertyInfo, 0); | |
$t.EmptyEvents = $d.array(System.Reflection.EventInfo, 0); | |
$t.EncodedTypes = [null, System.Object, System.Enum, System.MulticastDelegate, System.Delegate, | |
System.ValueType, System.Void, Boolean, System.Char, System.SByte, System.Byte, System.Int16, | |
System.UInt16, System.Int32, System.UInt32, System.Int64, System.UInt64, System.Decimal, | |
System.Single, System.Double, String, System.IntPtr, System.UIntPtr, Array, System.Nullable$1, | |
System.DateTime, System.TimeSpan, System.Type, System.Exception, Number]; | |
}; | |
$t.$ator = function() { | |
this.self = null; | |
this.baseType = null; | |
this.typeAttributes = 0; | |
this.fields = null; | |
this.methods = null; | |
this.constructors = null; | |
this.properties = null; | |
this.events = null; | |
this.isGenericType = false; | |
}; | |
$t.ctor = function Type(self, typeAttributes, fields, methods, constructors, properties, events, attributes) { | |
$t.$baseType.ctor.call(this, $t.GetNameFromFullName(self.$typeName), attributes); | |
var typeKind = self.$typeKind & 255; | |
if (typeAttributes == 2097152) { | |
typeAttributes |= 1; | |
if (typeKind == 66) | |
typeAttributes |= 160; | |
if ((typeKind & 32) != 0) | |
typeAttributes |= 256; | |
} | |
this.typeAttributes = typeAttributes; | |
this.self = self; | |
this.baseType = (typeKind == 68) ? (self === Object) ? null : Object.getPrototypeOf(self.prototype).constructor : (self.$baseType == Number) ? System.ValueType : self.$baseType; | |
if (self.$intfs && self.$intfs.constructor == Function) | |
self.$intfs = self.$intfs(); | |
this.declaringType = self.$declaringType; | |
$t.TryConstruct(fields, System.Reflection.FieldInfo.Create); | |
$t.TryConstruct(methods, System.Reflection.MethodInfo.Create); | |
$t.TryConstruct(constructors, System.Reflection.ConstructorInfo.Create); | |
$t.TryConstruct(properties, function(args) { | |
return System.Reflection.PropertyInfo.Create(methods, args); | |
}); | |
$t.TryConstruct(events, function(args) { | |
return System.Reflection.EventInfo.Create(methods, args); | |
}); | |
this.fields = (fields != null) ? $d.array(System.Reflection.FieldInfo, fields) : $t.EmptyFields; | |
this.methods = (methods != null) ? $d.array(System.Reflection.MethodInfo, methods) : $t.EmptyMethods; | |
this.constructors = (constructors != null) ? $d.array(System.Reflection.ConstructorInfo, constructors) : $t.EmptyConstructors; | |
this.properties = (properties != null) ? $d.array(System.Reflection.PropertyInfo, properties) : $t.EmptyProperties; | |
this.events = (events != null) ? $d.array(System.Reflection.EventInfo, events) : $t.EmptyEvents; | |
this.isGenericType = ((self.$typeKind & 256) != 0 || (self.$unconstructedType != null)) && (self.$typeKind != 64); | |
for (var $i = 0, $length = this.fields.length; $i != $length; $i++) { | |
var field = this.fields[$i]; | |
field.declaringType = self; | |
} | |
for (var $i1 = 0, $length1 = this.methods.length; $i1 != $length1; $i1++) { | |
var method = this.methods[$i1]; | |
method.declaringType = self; | |
} | |
for (var $i2 = 0, $length2 = this.properties.length; $i2 != $length2; $i2++) { | |
var property = this.properties[$i2]; | |
property.declaringType = self; | |
} | |
for (var $i3 = 0, $length3 = this.constructors.length; $i3 != $length3; $i3++) { | |
var constructor = this.constructors[$i3]; | |
constructor.declaringType = self; | |
} | |
}; | |
$t.ctor.prototype = $p; | |
$t.Create = function Type_Create(typeFunc, a) { | |
return (a.constructor === System.Type) ? a : new System.Type.ctor(typeFunc, a[0], a[1], a[2], | |
a[3], a[4], a[5], a[6]); | |
}; | |
$t.CreateEnum = function Type_CreateEnum(enumType) { | |
var typeAttributes = enumType.$enumTypeAttrs; | |
var enumNames = enumType.$enumNames; | |
var enumValues = enumType.$enumValues; | |
var enumAttrs = enumType.$getEnumAttrs ? enumType.$getEnumAttrs() : null; | |
var underlyingType = $d.tryDecodeTypeFunc(enumType.$underlyingType); | |
var attributes = enumType.$getEnumTypeAttrs ? enumType.$getEnumTypeAttrs() : null; | |
if ((typeAttributes & 32) != 0) { | |
attributes = [new System.FlagsAttribute.ctor()]; | |
typeAttributes &= ~32; | |
} | |
var fields = $d.array(System.Reflection.FieldInfo, enumNames.length); | |
for (var i = 0; i < enumNames.length; i++) { | |
fields[i] = new System.Reflection.FieldInfo.ctor(enumNames[i], underlyingType, 32854, enumValues[i], | |
enumAttrs ? enumAttrs[i] : null); | |
} | |
var methods = $d.typeOf(System.Enum).methods; | |
return new System.Type.ctor(enumType, enumType.$enumTypeAttrs, fields, methods, null, null, null, | |
attributes); | |
}; | |
$t.TryConstruct = function Type_TryConstruct(array, creator) { | |
if (array != null && array.$type == null) | |
for (var k = 0; k < array.length; k++) { | |
array[k] = creator(array[k]); | |
} | |
}; | |
$t.GetNameFromFullName = function Type_GetNameFromFullName(fullName) { | |
var k = fullName.indexOf("<"); | |
if (k == -1) | |
k = undefined; | |
return fullName.substring(Math.max(fullName.lastIndexOf(".", k), fullName.lastIndexOf("+", k)) + 1, | |
k); | |
}; | |
$p.get_MemberType = function Type_get_MemberType() { | |
return 32; | |
}; | |
$p.get_BaseType = function Type_get_BaseType() { | |
if (this.baseType == null) | |
return null; | |
else | |
return $d.typeOf(this.baseType); | |
}; | |
$p.get_Assembly = function Type_get_Assembly() { | |
return $d.assemblyOf(this.self.$assembly); | |
}; | |
$p.get_AssemblyQualifiedName = function Type_get_AssemblyQualifiedName() { | |
return this.get_FullName() + ", " + this.self.$assembly.fullName; | |
}; | |
$p.get_FullName = function Type_get_FullName() { | |
return this.self.$typeName; | |
}; | |
$t.GetType = function Type_GetType(typeName) { | |
for (var $i = 0, $a = System.AppDomain().get_CurrentDomain().GetAssemblies(), $length = $a.length; $i != $length; $i++) { | |
var assembly = $a[$i]; | |
var result = assembly.GetType$1(typeName); | |
if (result != null) | |
return result; | |
} | |
return null; | |
}; | |
$p.GetElementType = function Type_GetElementType() { | |
return this.self.$elementType == null ? null : $d.typeOf(this.self.$elementType); | |
}; | |
$p.IsAssignableFrom = function Type_IsAssignableFrom(type) { | |
return (type != null) && $d.typeIsAssignableFrom(this.self, type.self); | |
}; | |
$p.IsInstanceOfType = function Type_IsInstanceOfType(o) { | |
return $d.is(o, this.self); | |
}; | |
$p.GetInterfaces = function Type_GetInterfaces() { | |
return $d.typesOf(this.self.$intfs); | |
}; | |
$p.GetProperties = function Type_GetProperties() { | |
this.HasReflection(); | |
return System.Linq.Enumerable.ToArray(System.Reflection.PropertyInfo, System.Linq.Enumerable.Where(System.Reflection.PropertyInfo, | |
this.properties, $d.delegate(function(x) { | |
return (x.GetGetMethod() != null && x.GetGetMethod().get_IsPublic()) || (x.GetSetMethod() != null && x.GetSetMethod().get_IsPublic()); | |
}, this))); | |
}; | |
$p.GetEvents = function Type_GetEvents() { | |
this.HasReflection(); | |
return System.Linq.Enumerable.ToArray(System.Reflection.EventInfo, this.events); | |
}; | |
$p.GetEvent = function Type_GetEvent(name) { | |
for (var $i = 0, $a = this.GetEvents(), $length = $a.length; $i != $length; $i++) { | |
var eventInfo = $a[$i]; | |
if (eventInfo.get_Name() == name) | |
return eventInfo; | |
} | |
return null; | |
}; | |
$p.GetMethods = function Type_GetMethods() { | |
this.HasReflection(); | |
return System.Linq.Enumerable.ToArray(System.Reflection.MethodInfo, this.methods); | |
}; | |
$p.GetMethodImpl = function Type_GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers) { | |
for (var $i = 0, $a = this.GetMethods(), $length = $a.length; $i != $length; $i++) { | |
var method = $a[$i]; | |
if (method.get_Name() != name) | |
continue; | |
if ((bindingAttr & 32) != 32 && !method.get_IsPublic()) | |
continue; | |
var parameters = method.parameters; | |
if (types != null && types.length != parameters.length) | |
continue; | |
if (types != null) { | |
var isValid = true; | |
for (var i = 0; i < types.length; i++) { | |
if (types[i] != parameters[i].get_ParameterType()) | |
isValid = false; | |
} | |
if (!isValid) | |
continue; | |
} | |
return method; | |
} | |
return null; | |
}; | |
$p.GetMethod$2 = function Type_GetMethod(name, types) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
for (var index = 0; index < types.length; ++index) { | |
if (types[index] == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
} | |
return this.GetMethodImpl(name, 28, null, 3, types, null); | |
}; | |
$p.GetMethod$1 = function Type_GetMethod(name, bindingAttr) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
else | |
return this.GetMethodImpl(name, bindingAttr, null, 3, null, null); | |
}; | |
$p.GetMethod = function Type_GetMethod(name) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
else | |
return this.GetMethodImpl(name, 28, null, 3, null, null); | |
}; | |
$p.GetProperty$6 = function Type_GetProperty(name, bindingAttr, binder, returnType, types, modifiers) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
else | |
return this.GetPropertyImpl(name, bindingAttr, binder, returnType, types, modifiers); | |
}; | |
$p.GetProperty$5 = function Type_GetProperty(name, returnType, types, modifiers) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
else | |
return this.GetPropertyImpl(name, 28, null, returnType, types, modifiers); | |
}; | |
$p.GetProperty$1 = function Type_GetProperty(name, bindingAttr) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
else | |
return this.GetPropertyImpl(name, bindingAttr, null, null, null, null); | |
}; | |
$p.GetProperty$4 = function Type_GetProperty(name, returnType, types) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
else | |
return this.GetPropertyImpl(name, 28, null, returnType, types, null); | |
}; | |
$p.GetProperty$3 = function Type_GetProperty(name, types) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
else | |
return this.GetPropertyImpl(name, 28, null, null, types, null); | |
}; | |
$p.GetProperty$2 = function Type_GetProperty(name, returnType) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (returnType == null) | |
throw new System.ArgumentNullException.ctor$1("returnType"); | |
else | |
return this.GetPropertyImpl(name, 28, null, returnType, null, null); | |
}; | |
$p.GetProperty$7 = function Type_GetProperty(name, bindingAttr, returnType) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
if (returnType == null) | |
throw new System.ArgumentNullException.ctor$1("returnType"); | |
else | |
return this.GetPropertyImpl(name, bindingAttr, null, returnType, null, null); | |
}; | |
$p.GetProperty = function Type_GetProperty(name) { | |
if (name == null) | |
throw new System.ArgumentNullException.ctor$1("name"); | |
else | |
return this.GetPropertyImpl(name, 28, null, null, null, null); | |
}; | |
$p.GetPropertyImpl = function Type_GetPropertyImpl(name, bindingAttr, binder, returnType, types, modifiers) { | |
for (var $i = 0, $a = this.GetProperties(), $length = $a.length; $i != $length; $i++) { | |
var property = $a[$i]; | |
var anAccessor = property.get_GetMethod() || property.get_SetMethod(); | |
if (property.get_Name() != name) | |
continue; | |
if ((bindingAttr & 32) != 32 && !anAccessor.get_IsPublic()) | |
continue; | |
var parameters = property.GetIndexParameters(); | |
if (types != null && types.length != parameters.length) | |
continue; | |
if (types != null) { | |
var isValid = true; | |
for (var i = 0; i < types.length; i++) { | |
if (types[i] != parameters[i].get_ParameterType()) | |
isValid = false; | |
} | |
if (!isValid) | |
continue; | |
} | |
return property; | |
} | |
return null; | |
}; | |
$p.GetConstructors = function Type_GetConstructors() { | |
this.HasReflection(); | |
return System.Linq.Enumerable.ToArray(System.Reflection.ConstructorInfo, this.constructors); | |
}; | |
$p.GetField$1 = function Type_GetField(name, bindingAttr) { | |
for (var $i = 0, $length = this.fields.length; $i != $length; $i++) { | |
var field = this.fields[$i]; | |
if (field.get_Name() != name) | |
continue; | |
if ((bindingAttr & 32) != 32 && !field.get_IsPublic()) | |
continue; | |
return field; | |
} | |
return null; | |
}; | |
$p.GetField = function Type_GetField(name) { | |
return this.GetField$1(name, 28); | |
}; | |
$p.GetFields = function Type_GetFields() { | |
return this.GetFields$1(28); | |
}; | |
$p.GetFields$1 = function Type_GetFields(bindingAttr) { | |
this.HasReflection(); | |
return System.Linq.Enumerable.ToArray(System.Reflection.FieldInfo, this.fields); | |
}; | |
$p.get_IsValueType = function Type_get_IsValueType() { | |
return (this.self.$typeKind & 32) != 0; | |
}; | |
$p.GetArrayRank = function Type_GetArrayRank() { | |
return this.self.$arrayRank; | |
}; | |
$p.GetConstructor$2 = function Type_GetConstructor(bindingAttr, binder, callConvention, types, modifiers) { | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
for (var index = 0; index < types.length; ++index) { | |
if (types[index] == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
} | |
return this.GetConstructorImpl(bindingAttr, binder, callConvention, types, modifiers); | |
}; | |
$p.GetConstructor$1 = function Type_GetConstructor(bindingAttr, binder, types, modifiers) { | |
if (types == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
for (var index = 0; index < types.length; ++index) { | |
if (types[index] == null) | |
throw new System.ArgumentNullException.ctor$1("types"); | |
} | |
return this.GetConstructorImpl(bindingAttr, binder, 3, types, modifiers); | |
}; | |
$p.GetConstructor = function Type_GetConstructor(types) { | |
return this.GetConstructor$1(20, null, types, null); | |
}; | |
$p.GetConstructorImpl = function Type_GetConstructorImpl(bindingAttr, binder, callConvention, types, modifiers) { | |
for (var $i = 0, $a = this.GetConstructors(), $length = $a.length; $i != $length; $i++) { | |
var method = $a[$i]; | |
if ((bindingAttr & 32) != 32 && !method.get_IsPublic()) | |
continue; | |
var parameters = method.parameters; | |
if (types != null && types.length != parameters.length) | |
continue; | |
if (types != null) { | |
var isValid = true; | |
for (var i = 0; i < types.length; i++) { | |
if (types[i] != parameters[i].get_ParameterType()) | |
isValid = false; | |
} | |
if (!isValid) | |
continue; | |
} | |
return method; | |
} | |
return null; | |
}; | |
$p.GetEnumNames = function Type_GetEnumNames() { | |
return System.Enum.GetNames(this); | |
}; | |
$p.GetEnumValues = function Type_GetEnumValues() { | |
return System.Enum.GetValues(this); | |
}; | |
$p.GetEnumUnderlyingType = function Type_GetEnumUnderlyingType() { | |
if (this.get_IsEnum() && this.self.$underlyingType != null) | |
return $d.typeOf($d.tryDecodeTypeFunc(this.self.$underlyingType)); | |
else | |
throw new System.ArgumentException.ctor$3(System.Environment.GetResourceString("Arg_MustBeEnum"), | |
"enumType"); | |
}; | |
$p.MakeArrayType = function Type_MakeArrayType() { | |
return this.MakeArrayType$1(1); | |
}; | |
$p.MakeArrayType$1 = function Type_MakeArrayType(rank) { | |
if (rank < 1) | |
throw new System.ArgumentOutOfRangeException.ctor$1("rank must be positive"); | |
return $d.typeOf($d.arrayType(this.self, rank)); | |
}; | |
$p.get_Attributes = function Type_get_Attributes() { | |
return this.typeAttributes; | |
}; | |
$p.get_IsPrimitive = function Type_get_IsPrimitive() { | |
var tk = this.self.$typeKind; | |
return (tk >= 39 && tk <= 51) || (tk == 53) || (tk == 54); | |
}; | |
$p.get_IsAbstract = function Type_get_IsAbstract() { | |
return (this.typeAttributes & 128) != 0; | |
}; | |
$p.get_IsEnum = function Type_get_IsEnum() { | |
return (this.self.$typeKind == 63); | |
}; | |
$p.get_IsInterface = function Type_get_IsInterface() { | |
return (this.typeAttributes & 32) == 32; | |
}; | |
$p.get_IsSealed = function Type_get_IsSealed() { | |
return (this.typeAttributes & 256) != 0; | |
}; | |
$p.get_IsGenericType = function Type_get_IsGenericType() { | |
return this.isGenericType; | |
}; | |
$p.GetGenericTypeDefinition = function Type_GetGenericTypeDefinition() { | |
if (this.get_IsGenericTypeDefinition()) | |
return this; | |
else | |
if (this.isGenericType && this.self.$unconstructedType != null) | |
return $d.typeOf(this.self.$unconstructedType); | |
else | |
throw new System.InvalidOperationException.ctor$1("This operation is only valid on generic types"); | |
}; | |
$p.MakeGenericType = function Type_MakeGenericType(typeArguments) { | |
return $d.typeOf($d.genericType(this.self, typeArguments.map(function(x) { | |
return x.self; | |
}))); | |
}; | |
$p.get_GenericTypeArguments = function Type_get_GenericTypeArguments() { | |
if (this.isGenericType && !this.get_IsGenericTypeDefinition()) | |
return this.GetGenericArguments(); | |
else | |
return System.Type().EmptyTypes; | |
}; | |
$p.GetGenericArguments = function Type_GetGenericArguments() { | |
return this.isGenericType ? $d.typesOf(this.self.$typeArgs) : System.Type().EmptyTypes; | |
}; | |
$p.get_IsArray = function Type_get_IsArray() { | |
return this.self.$elementType != null; | |
}; | |
$p.get_IsTypedArrayCompatible = function Type_get_IsTypedArrayCompatible() { | |
return this.self.$elementType != null && this.self.$elementType.$arrayCtor != Array; | |
}; | |
$p.get_IsGenericTypeDefinition = function Type_get_IsGenericTypeDefinition() { | |
return (this.self.$typeKind & 256) != 0; | |
}; | |
$p.ToString = function Type_ToString() { | |
return "System.Type: " + this.get_FullName(); | |
}; | |
$p.get_IsGenericParameter = function Type_get_IsGenericParameter() { | |
return this.self.$typeKind == 67; | |
}; | |
$p.get_HasElementType = function Type_get_HasElementType() { | |
return this.self.$elementType != null; | |
}; | |
$p.get_IsNested = function Type_get_IsNested() { | |
return this.get_DeclaringType() != null; | |
}; | |
$p.get_IsNestedPublic = function Type_get_IsNestedPublic() { | |
return this.get_IsNested() && this.get_IsPublic(); | |
}; | |
$p.get_IsVisible = function Type_get_IsVisible() { | |
if (this.get_IsGenericParameter()) | |
return true; | |
if (this.get_HasElementType()) | |
return this.GetElementType().get_IsVisible(); | |
var type2; | |
for (type2 = this; type2.get_IsNested(); type2 = type2.get_DeclaringType()) { | |
if (!type2.get_IsNestedPublic()) | |
return false; | |
} | |
if (!type2.get_IsPublic()) | |
return false; | |
if (this.get_IsGenericType() && !this.get_IsGenericTypeDefinition()) { | |
for (var $i = 0, $a = this.GetGenericArguments(), $length = $a.length; $i != $length; $i++) { | |
var type3 = $a[$i]; | |
if (!type3.get_IsVisible()) | |
return false; | |
} | |
} | |
return true; | |
}; | |
$p.get_IsPublic = function Type_get_IsPublic() { | |
return (this.typeAttributes & 7) == 1; | |
}; | |
$p.get_TypeKind = function Type_get_TypeKind() { | |
return this.self.$typeKind; | |
}; | |
$p.HasReflection = function Type_HasReflection() { | |
if (this.self.$typeKind != 68 && this.self.$typeKind != 63 && this.self.$typeInfo == null) | |
throw new System.InvalidOperationException.ctor$1(String.Format("Type '{0}' compiled with no reflection data.\r\nRecompile with '[assembly: CompilerOptions(ReflectionLevel = <level>)]' or '[Js(ReflectionLevel = <level>)]' to include reflection data.", | |
$d.array(System.Object, [this.name]))); | |
}; | |
}); | |
System.TypeCode = $d.declareEnum("System.TypeCode", 45, $asm, 257, ["Empty", "Object", "DBNull", "Boolean", "Char", "SByte", "Byte", "Int16", "UInt16", "Int32", "UInt32", "Int64", "UInt64", "Single", "Double", "Decimal", "DateTime", "String"], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18]); | |
System.UInt16 = $d.declare("System.UInt16", Number, 44, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.UInt16), System.IEquatable$1(System.UInt16), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 44, 86, 0], ["MaxValue", 44, 86, 65535]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = 0; | |
$t.MaxValue = 65535; | |
$t.Parse = function UInt16_Parse(s) { return Number.Parse(System.UInt16, s); }; | |
$t.TryParse = function UInt16_TryParse(s, result) { return Number.TryParse(System.UInt16, s, result); }; | |
}); | |
System.UInt32 = $d.declare("System.UInt32", Number, 46, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.UInt32), System.IEquatable$1(System.UInt32), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 46, 86, 0], ["MaxValue", 46, 86, 4294967295]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = 0; | |
$t.MaxValue = 4294967295; | |
$t.Parse = function UInt32_Parse(s) { return Number.Parse(System.UInt32, s); }; | |
$t.TryParse = function UInt32_TryParse(s, result) { return Number.TryParse(System.UInt32, s, result); }; | |
}); | |
System.UInt64 = $d.declare("System.UInt64", Number, 48, $asm, function($t, $p) { | |
$t.$intfs = function() { return [System.IComparable, System.IComparable$1(System.UInt64), System.IEquatable$1(System.UInt64), System.IFormattable]; }; | |
$t.$typeInfo = function(t, p) { return [257, [["MinValue", 48, 86, 0], ["MaxValue", 48, 86, 9007199254740991]], [["Parse", t.Parse, 22], ["TryParse", t.TryParse, 22]], [["ctor", t.ctor, 6]]]; }; | |
$t.MinValue = 0; | |
$t.MaxValue = 9007199254740991; | |
$t.Parse = function UInt64_Parse(s) { return Number.Parse(System.UInt64, s); }; | |
$t.TryParse = function UInt64_TryParse(s, result) { return Number.TryParse(System.UInt64, s, result); }; | |
}); | |
System.UIntPtr = $d.declare("System.UIntPtr", null, 54, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
$t.ctor = function UIntPtr() {}; | |
$t.ctor.prototype = $p; | |
}); | |
System.Void = $d.declare("System.Void", null, 38, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [257, null, null, [["ctor", t.ctor, 6]]]; }; | |
}); | |
System.Web.HttpUtility = $d.declare("System.Web.HttpUtility", System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [1, null, [["UrlEncode", t.UrlEncode, 22], ["UrlDecode", t.UrlDecode, 22]]]; }; | |
$t.UrlEncode = function HttpUtility_UrlEncode(s) { | |
return encodeURIComponent(s); | |
}; | |
$t.UrlDecode = function HttpUtility_UrlDecode(s) { | |
return decodeURIComponent(s); | |
}; | |
}); | |
System.YieldIterator$1 = $d.declare("System.YieldIterator`1", System.Object, 256, $asm, function($t, $p, T) { | |
$t.$intfs = function() { return [System.Collections.Generic.IEnumerable$1(T), System.Collections.IEnumerable, System.Collections.Generic.IEnumerator$1(T), System.IDisposable, System.Collections.IEnumerator]; }; | |
$t.$typeInfo = function(t, p) { return [1, null, [["get_Current", p.get_Current, 6], ["set_Current", p.set_Current, 4], ["GetEnumerator", p.GetEnumerator, 6], ["Clone", p.Clone, 4], ["Dispose", p.Dispose, 6], ["Reset", p.Reset, 6]], [["ctor", t.ctor, 6]], [["Current", T, 0, 1]]]; }; | |
$t.$ator = function() { | |
this.isStarted = false; | |
this.Current = $d.default(T); | |
}; | |
$t.ctor = function YieldIterator$1() { | |
$t.$baseType.ctor.call(this); | |
}; | |
$t.ctor.prototype = $p; | |
$p.get_Current = function YieldIterator$1_get_Current() { return this.Current; }; | |
$p.set_Current = function YieldIterator$1_set_Current(value) { this.Current = value;return value; }; | |
$p.GetEnumerator = function YieldIterator$1_GetEnumerator() { | |
if (this.isStarted) | |
return this.Clone(); | |
else { | |
this.isStarted = true; | |
return this; | |
} | |
}; | |
$p.Clone = function YieldIterator$1_Clone() { | |
return null; | |
}; | |
$p.System$Collections$IEnumerable$GetEnumerator = function YieldIterator$1_System_Collections_IEnumerable_GetEnumerator() { | |
return this.GetEnumerator(); | |
}; | |
$p.Dispose = function YieldIterator$1_Dispose() {}; | |
$p.System$Collections$IEnumerator$get_Current = function YieldIterator$1_System$Collections$IEnumerator$get_Current() { | |
return this.get_Current(); | |
}; | |
$p.Reset = function YieldIterator$1_Reset() { | |
throw new System.NotImplementedException.ctor(); | |
}; | |
$p.System$Collections$Generic$IEnumerable$1$GetEnumerator = $p.GetEnumerator; | |
$p.System$Collections$Generic$IEnumerator$1$get_Current = $p.get_Current; | |
$p.System$IDisposable$Dispose = $p.Dispose; | |
$p.System$Collections$IEnumerator$Reset = $p.Reset; | |
}, ["T"]); | |
return $asm; | |
})(); | |
(function HelloDuoCode() { | |
"use strict"; | |
var $asm = { | |
fullName: "HelloDuoCode", | |
anonymousTypes: [], | |
types: [], | |
$getAttrs: function() { return [new System.Reflection.AssemblyTitleAttribute.ctor("HelloDuoCode"), new System.Reflection.AssemblyDescriptionAttribute.ctor(""), new System.Reflection.AssemblyConfigurationAttribute.ctor(""), new System.Reflection.AssemblyCompanyAttribute.ctor(""), new System.Reflection.AssemblyProductAttribute.ctor("HelloDuoCode"), new System.Reflection.AssemblyCopyrightAttribute.ctor("Copyright \xA9 2015"), new System.Reflection.AssemblyTrademarkAttribute.ctor(""), new System.Reflection.AssemblyCultureAttribute.ctor(""), new System.Reflection.AssemblyVersionAttribute.ctor("1.0.0.0"), new System.Reflection.AssemblyFileVersionAttribute.ctor("1.0.0.0"), new DuoCode.Runtime.CompilerAttribute.ctor("0.6.1253.0 beta")]; } | |
}; | |
// Snip Fix here | |
if(Memory.netg == undefined) | |
Memory.netg = {}; | |
var $g = Memory.netg; | |
var HelloDuoCode = $g.HelloDuoCode = $g.HelloDuoCode || {}; | |
var $d = $g.DuoCode.Runtime; // Used to be just DuoCode.Runtime needed fixing due to lack of global object | |
$d.$assemblies["HelloDuoCode"] = $asm; | |
HelloDuoCode.Program = $d.declare("HelloDuoCode.Program", $g.System.Object, 0, $asm, function($t, $p) { | |
$t.$typeInfo = function(t, p) { return [0, null, [["Run", t.Run, 17]]]; }; | |
$t.Run = function Program_Run() { | |
$g.System.Console.WriteLine$10("Hello DuoCode"); // Another Fix to look for $g.System instead of just System as no "Global" scope.. | |
}; | |
}); | |
HelloDuoCode.Program.Run(); // Snip. Run this.. | |
return $asm; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment