Exemplo n.º 1
0
    static int HttpRequestByMothdType(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 6);
            NetWorkManage        obj  = (NetWorkManage)ToLua.CheckObject(L, 1, typeof(NetWorkManage));
            BestHTTP.HTTPMethods arg0 = (BestHTTP.HTTPMethods)ToLua.CheckObject(L, 2, typeof(BestHTTP.HTTPMethods));
            string arg1 = ToLua.CheckString(L, 3);
            bool   arg2 = LuaDLL.luaL_checkboolean(L, 4);
            bool   arg3 = LuaDLL.luaL_checkboolean(L, 5);
            System.Action <int, string, string> arg4 = null;
            LuaTypes funcType6 = LuaDLL.lua_type(L, 6);

            if (funcType6 != LuaTypes.LUA_TFUNCTION)
            {
                arg4 = (System.Action <int, string, string>)ToLua.CheckObject(L, 6, typeof(System.Action <int, string, string>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 6);
                arg4 = DelegateFactory.CreateDelegate(typeof(System.Action <int, string, string>), func) as System.Action <int, string, string>;
            }

            obj.HttpRequestByMothdType(arg0, arg1, arg2, arg3, arg4);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
    static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        BestHTTP.HTTPMethods o = (BestHTTP.HTTPMethods)arg0;
        ToLua.Push(L, o);
        return(1);
    }
Exemplo n.º 3
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            BestHTTP.OnRequestFinishedDelegate @callback = (BestHTTP.OnRequestFinishedDelegate) typeof(BestHTTP.OnRequestFinishedDelegate).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 8);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            BestHTTP.HTTPMethods @methodType = (BestHTTP.HTTPMethods) typeof(BestHTTP.HTTPMethods).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Uri @uri = (System.Uri) typeof(System.Uri).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = new BestHTTP.HTTPRequest(@uri, @methodType, @callback);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemplo n.º 4
0
 static void Push(IntPtr L, BestHTTP.HTTPMethods arg)
 {
     ToLua.Push(L, arg);
 }