Beispiel #1
0
        int Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P.LaunchProcessWithDebuggerAttached(
            string filePath,
            string workingDirectory,
            string arguments,
            System.Collections.Generic.IDictionary_P <string, string> environmentVariables)
        {
            global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
            global::System.RuntimeTypeHandle     interfaceType    = typeof(Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P).TypeHandle;
            global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
                interfaceMethod,
                interfaceType
                );
            object[] callsiteArgs = new object[] {
                filePath,
                workingDirectory,
                arguments,
                environmentVariables
            };
            int retval = ((int)base.Invoke(
                              ((global::System.Reflection.MethodInfo)targetMethodInfo),
                              callsiteArgs
                              ));

            return(retval);
        }
Beispiel #2
0
        public static global::Array <object> makeStack(global::System.Diagnostics.StackTrace s)
        {
            global::Array <object> stack = new global::Array <object>(new object[] {});

            {
                int _g1 = 0;
                int _g  = s.FrameCount;
                while ((_g1 < _g))
                {
                    int i = _g1++;
                    global::System.Diagnostics.StackFrame frame = s.GetFrame(((int)(i)));
                    global::System.Reflection.MethodBase  m     = frame.GetMethod();
                    if ((m == null))
                    {
                        continue;
                    }

                    global::haxe.StackItem method = global::haxe.StackItem.Method(((m as global::System.Reflection.MemberInfo).ReflectedType as global::System.Reflection.MemberInfo).ToString(), (m as global::System.Reflection.MemberInfo).Name);
                    string fileName   = frame.GetFileName();
                    int    lineNumber = frame.GetFileLineNumber();
                    if ((!(string.Equals(fileName, null)) || (lineNumber >= 0)))
                    {
                        stack.push(global::haxe.StackItem.FilePos(method, fileName, lineNumber));
                    }
                    else
                    {
                        stack.push(method);
                    }
                }
            }

            return(stack);
        }
Beispiel #3
0
 void Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P.OnRunComplete(
     bool isCanceled,
     bool isAborted,
     System.Collections.Generic.ICollection_P <string> executorUris,
     System.Exception_P exception,
     Microsoft.VisualStudio.TestPlatform.Core.TestRunStats_P testRunStats,
     System.Collections.Generic.IEnumerable_P <Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult_P> lastChunk,
     bool adapterHintedToShutdownAfterRun,
     System.TimeSpan_P elapsedTime,
     System.Collections.Generic.ICollection_P <Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet_P> runContextAttachments)
 {
     global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
     global::System.RuntimeTypeHandle     interfaceType    = typeof(Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P).TypeHandle;
     global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
         interfaceMethod,
         interfaceType
         );
     object[] callsiteArgs = new object[] {
         isCanceled,
         isAborted,
         executorUris,
         exception,
         testRunStats,
         lastChunk,
         adapterHintedToShutdownAfterRun,
         elapsedTime,
         runContextAttachments
     };
     base.Invoke(
         ((global::System.Reflection.MethodInfo)targetMethodInfo),
         callsiteArgs
         );
 }
Beispiel #4
0
 private static global::net.sf.jni4net.utils.JniHandle Invoke5(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle invokeAttr, global::net.sf.jni4net.utils.JniLocalHandle binder, global::net.sf.jni4net.utils.JniLocalHandle parameters, global::net.sf.jni4net.utils.JniLocalHandle culture)
 {
     // (Lsystem/Object;Lsystem/reflection/BindingFlags;Lsystem/Object;[Lsystem/Object;Lsystem/Object;)Lsystem/Object;
     // (LSystem/Object;LSystem/Reflection/BindingFlags;LSystem/Reflection/Binder;[LSystem/Object;LSystem/Globalization/CultureInfo;)LSystem/Object;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.FullC2J <object>(@__env, ((global::System.Runtime.InteropServices._MethodBase)(@__real)).Invoke(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.BindingFlags>(@__env, invokeAttr), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.Binder>(@__env, binder), global::net.sf.jni4net.utils.Convertor.ArrayFullJ2C <object[], object>(@__env, parameters), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Globalization.CultureInfo>(@__env, culture)));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #5
0
 private static global::net.sf.jni4net.utils.JniHandle MethodHandle2(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/ValueType;
     // ()LSystem/RuntimeMethodHandle;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.StrongC2Jp <global::System.RuntimeMethodHandle>(@__env, ((global::System.Runtime.InteropServices._MethodBase)(@__real)).MethodHandle);
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #6
0
 private static global::net.sf.jni4net.utils.JniHandle GetGenericArguments24(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()[Lsystem/Type;
     // ()[LSystem/Type;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.ArrayStrongC2Jp <global::System.Type[], global::System.Type>(@__env, @__real.GetGenericArguments());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #7
0
 private static global::net.sf.jni4net.utils.JniHandle GetMethodBody31(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/Object;
     // ()LSystem/Reflection/MethodBody;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.StrongC2Jp <global::System.Reflection.MethodBody>(@__env, @__real.GetMethodBody());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #8
0
 private static global::net.sf.jni4net.utils.JniHandle GetParameters0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()[Lsystem/reflection/ParameterInfo;
     // ()[LSystem/Reflection/ParameterInfo;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.ArrayStrongC2Jp <global::System.Reflection.ParameterInfo[], global::System.Reflection.ParameterInfo>(@__env, ((global::System.Runtime.InteropServices._MethodBase)(@__real)).GetParameters());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #9
0
 private static global::net.sf.jni4net.utils.JniHandle GetMethodImplementationFlags1(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/Enum;
     // ()LSystem/Reflection/MethodImplAttributes;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.StrongC2Jp <global::System.Reflection.MethodImplAttributes>(@__env, ((global::System.Runtime.InteropServices._MethodBase)(@__real)).GetMethodImplementationFlags());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #10
0
 private static global::net.sf.jni4net.utils.JniHandle Invoke19(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle parameters)
 {
     // (Lsystem/Object;[Lsystem/Object;)Lsystem/Object;
     // (LSystem/Object;[LSystem/Object;)LSystem/Object;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.FullC2J <object>(@__env, ((global::System.Runtime.InteropServices._MethodBase)(@__real)).Invoke(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.ArrayFullJ2C <object[], object>(@__env, parameters)));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Beispiel #11
0
        private static bool IsConstructor18(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
        {
            // ()Z
            // ()Z
            global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
            bool @__return = default(bool);

            try {
                global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
                @__return = ((bool)(((global::System.Runtime.InteropServices._MethodBase)(@__real)).IsConstructor));
            }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
            return(@__return);
        }
Beispiel #12
0
        private static bool IsSecurityTransparent30(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
        {
            // ()Z
            // ()Z
            global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
            bool @__return = default(bool);

            try {
                global::System.Reflection.MethodBase @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.MethodBase>(@__env, @__obj);
                @__return = ((bool)(@__real.IsSecurityTransparent));
            }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
            return(@__return);
        }
Beispiel #13
0
 Microsoft.VisualStudio.TestPlatform.Core.PollRequest_P Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P.PollForRequest()
 {
     global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
     global::System.RuntimeTypeHandle     interfaceType    = typeof(Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P).TypeHandle;
     global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
         interfaceMethod,
         interfaceType
         );
     object[] callsiteArgs = new object[0];
     Microsoft.VisualStudio.TestPlatform.Core.PollRequest_P retval = ((Microsoft.VisualStudio.TestPlatform.Core.PollRequest_P)base.Invoke(
                                                                          ((global::System.Reflection.MethodInfo)targetMethodInfo),
                                                                          callsiteArgs
                                                                          ));
     return(retval);
 }
Beispiel #14
0
 void Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P.OnLogMessages(System.Collections.Generic.IEnumerable_P <Microsoft.VisualStudio.TestPlatform.Core.LogMessage_P> messages)
 {
     global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
     global::System.RuntimeTypeHandle     interfaceType    = typeof(Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P).TypeHandle;
     global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
         interfaceMethod,
         interfaceType
         );
     object[] callsiteArgs = new object[] {
         messages
     };
     base.Invoke(
         ((global::System.Reflection.MethodInfo)targetMethodInfo),
         callsiteArgs
         );
 }
 System.Threading.Tasks.Task_P <Egee.Proxy.Sappel.InitResponse_P> Egee.Proxy.Sappel.ISappelService_P.InitAsync(Egee.Proxy.Sappel.InitRequest_P request)
 {
     global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
     global::System.RuntimeTypeHandle     interfaceType    = typeof(Egee.Proxy.Sappel.ISappelService_P).TypeHandle;
     global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
         interfaceMethod,
         interfaceType
         );
     object[] callsiteArgs = new object[] {
         request
     };
     System.Threading.Tasks.Task_P <Egee.Proxy.Sappel.InitResponse_P> retval = ((System.Threading.Tasks.Task_P <Egee.Proxy.Sappel.InitResponse_P>)base.Invoke(
                                                                                    ((global::System.Reflection.MethodInfo)targetMethodInfo),
                                                                                    callsiteArgs
                                                                                    ));
     return(retval);
 }
Beispiel #16
0
 void Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P.OnTestRunChanges(
     Microsoft.VisualStudio.TestPlatform.Core.TestRunStats_P testRunStats,
     System.Collections.Generic.IEnumerable_P <Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult_P> newTestResults,
     System.Collections.Generic.IEnumerable_P <Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase_P> inProgressTestCases)
 {
     global::System.RuntimeMethodHandle   interfaceMethod  = global::System.Reflection.DispatchProxyHelpers.GetCorrespondingInterfaceMethodFromMethodImpl();
     global::System.RuntimeTypeHandle     interfaceType    = typeof(Microsoft.VisualStudio.TestPlatform.Core.IUniversalTestExecutorService_P).TypeHandle;
     global::System.Reflection.MethodBase targetMethodInfo = global::System.Reflection.MethodBase.GetMethodFromHandle(
         interfaceMethod,
         interfaceType
         );
     object[] callsiteArgs = new object[] {
         testRunStats,
         newTestResults,
         inProgressTestCases
     };
     base.Invoke(
         ((global::System.Reflection.MethodInfo)targetMethodInfo),
         callsiteArgs
         );
 }
Beispiel #17
0
        public static global::Array <object> toHaxe(global::System.Diagnostics.StackTrace native, global::haxe.lang.Null <int> skip)
        {
                        #line 31 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
            int skip1 = ((!(skip.hasValue)) ? (0) : ((skip).@value));
            global::Array <object> stack = new global::Array <object>(new object[] {});
                        #line 33 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
            if ((native == null))
            {
                                #line 34 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                return(stack);
            }

                        #line 36 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
            int cnt = 0;
            {
                                #line 37 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                int _g = 0;
                                #line 37 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                int _g1 = native.FrameCount;
                                #line 37 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                while ((_g < _g1))
                {
                                        #line 37 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    int i = _g++;
                    global::System.Diagnostics.StackFrame frame = native.GetFrame(((int)(i)));
                                        #line 39 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    global::System.Reflection.MethodBase m = frame.GetMethod();
                                        #line 41 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    if ((m == null))
                    {
                                                #line 42 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                        continue;
                    }

                                        #line 44 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    if ((skip1 > cnt++))
                    {
                                                #line 45 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                        continue;
                    }

                                        #line 48 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    global::haxe.StackItem method = global::haxe.StackItem.Method(((m as global::System.Reflection.MemberInfo).ReflectedType as global::System.Reflection.MemberInfo).ToString(), (m as global::System.Reflection.MemberInfo).Name);
                                        #line 50 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    string fileName   = frame.GetFileName();
                    int    lineNumber = frame.GetFileLineNumber();
                                        #line 53 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                    if (((fileName != null) || (lineNumber >= 0)))
                    {
                                                #line 54 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                        stack.push(global::haxe.StackItem.FilePos(method, fileName, lineNumber, default(global::haxe.lang.Null <int>)));
                    }
                    else
                    {
                                                #line 56 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
                        stack.push(method);
                    }
                }
            }

                        #line 58 "/opt/haxe/std/cs/_std/haxe/NativeStackTrace.hx"
            return(stack);
        }
Beispiel #18
0
        public static object callMethod(object obj, global::System.Reflection.MethodBase[] methods, int methodLength, global::haxe.root.Array args)
        {
            unchecked
            {
                if ((methodLength == 0))
                {
                    throw global::haxe.lang.HaxeException.wrap("No available methods");
                }

                int      length          = ((int)(global::haxe.lang.Runtime.getField_f(args, "length", 520590566, true)));
                object[] oargs           = new object[((int)(length))];
                global::System.Type[] ts = new global::System.Type[((int)(length))];
                int[] rates = new int[((int)((methods as global::System.Array).Length))];
                {
                    int _g = 0;
                    while ((_g < ((int)(length))))
                    {
                        int i = _g++;
                        oargs[i] = args[i];
                        if ((!(global::haxe.lang.Runtime.eq(args[i], default(object)))))
                        {
                            ts[i] = global::cs.Lib.nativeType(args[i]);
                        }
                    }
                }

                int last = 0;
                if ((methodLength > 1))
                {
                    {
                        int _g1 = 0;
                        while ((_g1 < methodLength))
                        {
                            int i1 = _g1++;
                            global::System.Reflection.ParameterInfo[] @params = methods[i1].GetParameters();
                            if (((@params as global::System.Array).Length != length))
                            {
                                continue;
                            }
                            else
                            {
                                bool fits  = true;
                                int  crate = 0;
                                {
                                    int _g2  = 0;
                                    int _g11 = (@params as global::System.Array).Length;
                                    while ((_g2 < _g11))
                                    {
                                        int i2 = _g2++;
                                        global::System.Type param = @params[i2].ParameterType;
                                        string strParam           = global::haxe.lang.Runtime.concat(global::Std.@string(param), "");
                                        if (param.IsAssignableFrom(((global::System.Type)(ts[i2]))))
                                        {
                                            continue;
                                        }
                                        else
                                        {
                                            if ((strParam.StartsWith("haxe.lang.Null") || (((global::haxe.lang.Runtime.eq(oargs[i2], default(object)) || (oargs[i2] is global::System.IConvertible))) && (((global::System.Type)(typeof(global::System.IConvertible)))).IsAssignableFrom(((global::System.Type)(param))))))
                                            {
                                                crate++;
                                                continue;
                                            }
                                            else
                                            {
                                                if (!(param.ContainsGenericParameters))
                                                {
                                                    fits = false;
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                }

                                if (fits)
                                {
                                    rates[last]     = crate;
                                    methods[last++] = methods[i1];
                                }
                            }
                        }
                    }

                    methodLength = last;
                }
                else
                {
                    if (((methodLength == 1) && ((methods[0].GetParameters() as global::System.Array).Length != length)))
                    {
                        methodLength = 0;
                    }
                }

                if ((methodLength == 0))
                {
                    throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat("Invalid calling parameters for method ", (methods[0] as global::System.Reflection.MemberInfo).Name));
                }

                double best       = global::Math.POSITIVE_INFINITY;
                int    bestMethod = 0;
                {
                    int _g3 = 0;
                    while ((_g3 < methodLength))
                    {
                        int i3 = _g3++;
                        if ((rates[i3] < best))
                        {
                            bestMethod = i3;
                            best       = ((double)(rates[i3]));
                        }
                    }
                }

                methods[0] = methods[bestMethod];
                global::System.Reflection.ParameterInfo[] params1 = methods[0].GetParameters();
                {
                    int _g12 = 0;
                    int _g4  = (params1 as global::System.Array).Length;
                    while ((_g12 < _g4))
                    {
                        int i4 = _g12++;
                        global::System.Type param1 = params1[i4].ParameterType;
                        string strParam1           = global::haxe.lang.Runtime.concat(global::Std.@string(param1), "");
                        if (strParam1.StartsWith("haxe.lang.Null"))
                        {
                            oargs[i4] = global::haxe.lang.Runtime.mkNullable(oargs[i4], param1);
                        }
                        else
                        {
                            if ((((global::System.Type)(typeof(global::System.IConvertible)))).IsAssignableFrom(((global::System.Type)(param1))))
                            {
                                if (global::haxe.lang.Runtime.eq(oargs[i4], default(object)))
                                {
                                    if (param1.IsValueType)
                                    {
                                        oargs[i4] = global::System.Activator.CreateInstance(((global::System.Type)(param1)));
                                    }
                                }
                                else
                                {
                                    oargs[i4] = (((global::System.IConvertible)(oargs[i4]))).ToType(((global::System.Type)(param1)), ((global::System.IFormatProvider)(default(global::System.IFormatProvider))));
                                }
                            }
                        }
                    }
                }

                if ((methods[0].ContainsGenericParameters && (methods[0] is global::System.Reflection.MethodInfo)))
                {
                    global::System.Reflection.MethodInfo m = ((global::System.Reflection.MethodInfo)(methods[0]));
                    global::System.Type[] tgs = (m as global::System.Reflection.MethodBase).GetGenericArguments();
                    {
                        int _g13 = 0;
                        int _g5  = (tgs as global::System.Array).Length;
                        while ((_g13 < _g5))
                        {
                            int i5 = _g13++;
                            tgs[i5] = typeof(object);
                        }
                    }

                    m = m.MakeGenericMethod(((global::System.Type[])(tgs)));
                    object retg = (m as global::System.Reflection.MethodBase).Invoke(((object)(obj)), ((object[])(oargs)));
                    return(global::haxe.lang.Runtime.unbox(retg));
                }

                global::System.Reflection.MethodBase m1 = methods[0];
                if ((global::haxe.lang.Runtime.eq(obj, default(object)) && (m1 is global::System.Reflection.ConstructorInfo)))
                {
                    object ret = (((global::System.Reflection.ConstructorInfo)(m1))).Invoke(((object[])(oargs)));
                    return(global::haxe.lang.Runtime.unbox(ret));
                }

                object ret1 = m1.Invoke(((object)(obj)), ((object[])(oargs)));
                return(global::haxe.lang.Runtime.unbox(ret1));
            }
        }