public static global::System.Type resolveClass(string name) { global::System.Type t = global::System.Type.GetType(((string)(name))); if (global::haxe.lang.Runtime.typeEq(t, null)) { global::System.Collections.IEnumerator all = (global::System.AppDomain.CurrentDomain.GetAssemblies() as global::System.Array).GetEnumerator(); while (all.MoveNext()) { global::System.Reflection.Assembly t2 = ((global::System.Reflection.Assembly)(all.Current)); t = t2.GetType(((string)(name))); if (!(global::haxe.lang.Runtime.typeEq(t, null))) { break; } } } if (global::haxe.lang.Runtime.typeEq(t, null)) { switch (name) { case "Class": { return((global::System.Type)(typeof(global::System.Type))); } case "Dynamic": { return((global::System.Type)(typeof(object))); } case "Float": { return((global::System.Type)(typeof(double))); } case "Int": { return((global::System.Type)(typeof(int))); } case "String": { return((global::System.Type)(typeof(string))); } default: { return(null); } } } else if ((t.IsInterface && (((global::System.Type)(typeof(global::haxe.lang.IGenericObject)))).IsAssignableFrom(((global::System.Type)(t))))) { { uint _g_idx = default(uint); object[] _g_arr = (t as global::System.Reflection.MemberInfo).GetCustomAttributes(((bool)(true))); _g_idx = ((uint)(0)); while (((bool)((_g_idx < (_g_arr as global::System.Array).Length)))) { object attr = ((object)(_g_arr[((int)(_g_idx++))])); global::haxe.lang.GenericInterface g = ((global::haxe.lang.GenericInterface)((attr as global::haxe.lang.GenericInterface))); if ((g != null)) { return((global::System.Type)(g.generic)); } } } return((global::System.Type)(t)); } else { return((global::System.Type)(t)); } }
public static global::System.Type resolveClass(string name) { unchecked { #line 101 "/opt/haxe/std/cs/_std/Type.hx" global::System.Type t = global::System.Type.GetType(((string)(name))); #line 103 "/opt/haxe/std/cs/_std/Type.hx" if (global::System.Object.ReferenceEquals(((object)(t)), default(object))) { #line 104 "/opt/haxe/std/cs/_std/Type.hx" global::System.Collections.IEnumerator all = (global::System.AppDomain.CurrentDomain.GetAssemblies() as global::System.Array).GetEnumerator(); while (all.MoveNext()) { #line 106 "/opt/haxe/std/cs/_std/Type.hx" global::System.Reflection.Assembly t2 = ((global::System.Reflection.Assembly)(all.Current)); t = t2.GetType(((string)(name))); #line 108 "/opt/haxe/std/cs/_std/Type.hx" if (!(global::System.Object.ReferenceEquals(((object)(t)), default(object)))) { #line 109 "/opt/haxe/std/cs/_std/Type.hx" break; } } } #line 113 "/opt/haxe/std/cs/_std/Type.hx" if (global::System.Object.ReferenceEquals(((object)(t)), default(object))) { #line 114 "/opt/haxe/std/cs/_std/Type.hx" switch (name) { case "Bool": { #line 126 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(bool))); } case "Class": { #line 120 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(global::System.Type))); } case "Dynamic": { #line 122 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(object))); } case "Float": { #line 118 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(double))); } case "Int": { #line 116 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(int))); } case "String": { #line 124 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(typeof(string))); } default: { #line 128 "/opt/haxe/std/cs/_std/Type.hx" return(null); } } } else if ((t.IsInterface && (((global::System.Type)(typeof(global::haxe.lang.IGenericObject)))).IsAssignableFrom(((global::System.Type)(t))))) { #line 133 "/opt/haxe/std/cs/_std/Type.hx" { #line 133 "/opt/haxe/std/cs/_std/Type.hx" object[] _g_arr = (t as global::System.Reflection.MemberInfo).GetCustomAttributes(((bool)(true))); #line 133 "/opt/haxe/std/cs/_std/Type.hx" uint _g_idx = ((uint)(0)); #line 133 "/opt/haxe/std/cs/_std/Type.hx" while ((_g_idx < (_g_arr as global::System.Array).Length)) { #line 133 "/opt/haxe/std/cs/_std/Type.hx" _g_idx += ((uint)(1)); #line 133 "/opt/haxe/std/cs/_std/Type.hx" object attr = ((object)(_g_arr[((int)(((uint)((_g_idx - 1)))))])); global::haxe.lang.GenericInterface g = (((object)(attr)) as global::haxe.lang.GenericInterface); #line 135 "/opt/haxe/std/cs/_std/Type.hx" if ((g != null)) { #line 136 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(g.generic)); } } } #line 139 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(t)); } else { #line 142 "/opt/haxe/std/cs/_std/Type.hx" return((global::System.Type)(t)); } } #line default }
public static global::System.Type resolveClass(string name) { unchecked { #line 98 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" if ((global::haxe.lang.StringExt.indexOf(name, ".", null) == -1)) { #line 99 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" name = global::haxe.lang.Runtime.concat("haxe.root.", name); } #line 101 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" global::System.Type t = global::System.Type.GetType(((string)(name))); #line 103 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" if (global::System.Object.ReferenceEquals(((object)(t)), default(object))) { #line 104 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" global::System.Collections.IEnumerator all = (global::System.AppDomain.CurrentDomain.GetAssemblies() as global::System.Array).GetEnumerator(); while (all.MoveNext()) { #line 106 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" global::System.Reflection.Assembly t2 = ((global::System.Reflection.Assembly)(all.Current)); t = t2.GetType(((string)(name))); #line 108 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" if (!(global::System.Object.ReferenceEquals(((object)(t)), default(object)))) { #line 109 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" break; } } } #line 113 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" if (global::System.Object.ReferenceEquals(((object)(t)), default(object))) { #line 114 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" switch (name) { case "haxe.root.Bool": { #line 126 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(bool))); } case "haxe.root.Class": { #line 120 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(global::System.Type))); } case "haxe.root.Dynamic": { #line 122 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(object))); } case "haxe.root.Float": { #line 118 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(double))); } case "haxe.root.Int": { #line 116 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(int))); } case "haxe.root.String": { #line 124 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(typeof(string))); } default: { #line 128 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return(null); } } } else { #line 142 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx" return((global::System.Type)(t)); } } #line default }