static int _m_SaveDataToFile_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    string _path   = LuaAPI.lua_tostring(L, 1);
                    byte[] _buffer = LuaAPI.lua_tobytes(L, 2);

                    bool gen_ret = XLuaFramework.Pathtool.SaveDataToFile(_path, _buffer);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #2
0
        static int _m_SafeWriteAllBytes_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    string _outFile  = LuaAPI.lua_tostring(L, 1);
                    byte[] _outBytes = LuaAPI.lua_tobytes(L, 2);

                    bool gen_ret = GameUtility.SafeWriteAllBytes(_outFile, _outBytes);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_Compress_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    byte[] _content = LuaAPI.lua_tobytes(L, 1);

                    byte[] gen_ret = DCETRuntime.ZipHelper.Compress(
                        _content);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_ToBoolean_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    byte[] _value      = LuaAPI.lua_tobytes(L, 1);
                    int    _startIndex = LuaAPI.xlua_tointeger(L, 2);

                    bool gen_ret = System.BitConverter.ToBoolean(_value, _startIndex);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_OnReceivedMessage_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    ushort _protoID  = (ushort)LuaAPI.xlua_tointeger(L, 1);
                    ushort _RPCID    = (ushort)LuaAPI.xlua_tointeger(L, 2);
                    byte[] _cmd_byte = LuaAPI.lua_tobytes(L, 3);

                    Game.TcpManager.OnReceivedMessage(_protoID, _RPCID, _cmd_byte);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] _data = LuaAPI.lua_tobytes(L, 2);

                    FairyGUI.Utils.ZipReader gen_ret = new FairyGUI.Utils.ZipReader(_data);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Utils.ZipReader constructor!"));
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] _bytes = LuaAPI.lua_tobytes(L, 2);

                    MikuLuaProfiler.BytesLoadInfo gen_ret = new MikuLuaProfiler.BytesLoadInfo(_bytes);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to MikuLuaProfiler.BytesLoadInfo constructor!"));
        }
        static int _m_Write(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ETCold.CircularBuffer gen_to_be_invoked = (ETCold.CircularBuffer)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.IO.Stream>(L, 2))
                {
                    System.IO.Stream _stream = (System.IO.Stream)translator.GetObject(L, 2, typeof(System.IO.Stream));

                    gen_to_be_invoked.Write(
                        _stream);



                    return(0);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    byte[] _buffer = LuaAPI.lua_tobytes(L, 2);
                    int    _offset = LuaAPI.xlua_tointeger(L, 3);
                    int    _count  = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.Write(
                        _buffer,
                        _offset,
                        _count);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to ETCold.CircularBuffer.Write!"));
        }
Beispiel #9
0
        static int _m_KcpSend_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    System.IntPtr _kcp    = LuaAPI.lua_touserdata(L, 1);
                    byte[]        _buffer = LuaAPI.lua_tobytes(L, 2);
                    int           _len    = LuaAPI.xlua_tointeger(L, 3);

                    int gen_ret = DCET.Model.Kcp.KcpSend(_kcp, _buffer, _len);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_SaveToFile_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    string _path = LuaAPI.lua_tostring(L, 1);
                    byte[] _data = LuaAPI.lua_tobytes(L, 2);

                    PF.AstarSerializer.SaveToFile(
                        _path,
                        _data);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_FromBytes_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && translator.Assignable <System.Type>(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    System.Type _type  = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    byte[]      _bytes = LuaAPI.lua_tobytes(L, 2);
                    int         _index = LuaAPI.xlua_tointeger(L, 3);
                    int         _count = LuaAPI.xlua_tointeger(L, 4);

                    object gen_ret = DCET.Model.ProtobufHelper.FromBytes(_type, _bytes, _index, _count);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <object>(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    object _instance = translator.GetObject(L, 1, typeof(object));
                    byte[] _bytes    = LuaAPI.lua_tobytes(L, 2);
                    int    _index    = LuaAPI.xlua_tointeger(L, 3);
                    int    _count    = LuaAPI.xlua_tointeger(L, 4);

                    object gen_ret = DCET.Model.ProtobufHelper.FromBytes(_instance, _bytes, _index, _count);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to DCET.Model.ProtobufHelper.FromBytes!"));
        }
        static int _m_Hookloadbuffer_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    System.IntPtr _L    = LuaAPI.lua_touserdata(L, 1);
                    byte[]        _buff = LuaAPI.lua_tobytes(L, 2);
                    string        _name = LuaAPI.lua_tostring(L, 3);

                    byte[] gen_ret = MikuLuaProfiler.LuaHook.Hookloadbuffer(_L, _buff, _name);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_GenerateId(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.IdGenerators.AscendingGuidGenerator gen_to_be_invoked = (MongoDB.Bson.Serialization.IdGenerators.AscendingGuidGenerator)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    long   _tickCount        = LuaAPI.lua_toint64(L, 2);
                    byte[] _machineProcessId = LuaAPI.lua_tobytes(L, 3);
                    int    _increment        = LuaAPI.xlua_tointeger(L, 4);

                    object gen_ret = gen_to_be_invoked.GenerateId(_tickCount, _machineProcessId, _increment);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <object>(L, 2) && translator.Assignable <object>(L, 3))
                {
                    object _container = translator.GetObject(L, 2, typeof(object));
                    object _document  = translator.GetObject(L, 3, typeof(object));

                    object gen_ret = gen_to_be_invoked.GenerateId(_container, _document);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.Serialization.IdGenerators.AscendingGuidGenerator.GenerateId!"));
        }
Beispiel #14
0
        static int _m_KcpInput_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    System.IntPtr _kcp    = LuaAPI.lua_touserdata(L, 1);
                    byte[]        _data   = LuaAPI.lua_tobytes(L, 2);
                    int           _offset = LuaAPI.xlua_tointeger(L, 3);
                    int           _size   = LuaAPI.xlua_tointeger(L, 4);

                    int gen_ret = DCET.Model.Kcp.KcpInput(_kcp, _data, _offset, _size);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_luaL_loadbuffer_replace_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    System.IntPtr _luaState = LuaAPI.lua_touserdata(L, 1);
                    byte[]        _buff     = LuaAPI.lua_tobytes(L, 2);
                    int           _size     = LuaAPI.xlua_tointeger(L, 3);
                    string        _name     = LuaAPI.lua_tostring(L, 4);

                    int gen_ret = MikuLuaProfiler.LuaDLL.luaL_loadbuffer_replace(_luaState, _buff, _size, _name);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #16
0
        static int _m_CreateComInstanceFrom_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _assemblyName = LuaAPI.lua_tostring(L, 1);
                    string _typeName     = LuaAPI.lua_tostring(L, 2);

                    var gen_ret = System.Activator.CreateComInstanceFrom(_assemblyName, _typeName);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Configuration.Assemblies.AssemblyHashAlgorithm>(L, 4))
                {
                    string _assemblyName = LuaAPI.lua_tostring(L, 1);
                    string _typeName     = LuaAPI.lua_tostring(L, 2);
                    byte[] _hashValue    = LuaAPI.lua_tobytes(L, 3);
                    System.Configuration.Assemblies.AssemblyHashAlgorithm _hashAlgorithm; translator.Get(L, 4, out _hashAlgorithm);

                    var gen_ret = System.Activator.CreateComInstanceFrom(_assemblyName, _typeName, _hashValue, _hashAlgorithm);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to System.Activator.CreateComInstanceFrom!"));
        }
Beispiel #17
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    xc.EquipModData __cl_gen_ret = new xc.EquipModData();
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 18 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 8) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 9) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 10) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 11) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 12) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 13) && (LuaAPI.lua_isnil(L, 14) || LuaAPI.lua_type(L, 14) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 15) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 16) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 17) && translator.Assignable <System.Collections.Generic.List <System.Collections.Generic.List <uint> > >(L, 18))
                {
                    uint   id                 = LuaAPI.xlua_touint(L, 2);
                    uint   pos                = LuaAPI.xlua_touint(L, 3);
                    uint   ar_con_need        = LuaAPI.xlua_touint(L, 4);
                    uint   ar_str_need        = LuaAPI.xlua_touint(L, 5);
                    uint   ar_agi_need        = LuaAPI.xlua_touint(L, 6);
                    uint   ar_int_need        = LuaAPI.xlua_touint(L, 7);
                    uint   legend_attrs_num   = LuaAPI.xlua_touint(L, 8);
                    uint   model              = LuaAPI.xlua_touint(L, 9);
                    uint   lv_step            = LuaAPI.xlua_touint(L, 10);
                    uint   strength_max       = LuaAPI.xlua_touint(L, 11);
                    uint   suit_id            = LuaAPI.xlua_touint(L, 12);
                    uint   pet_exp            = LuaAPI.xlua_touint(L, 13);
                    byte[] default_extra_desc = LuaAPI.lua_tobytes(L, 14);
                    uint   default_star       = LuaAPI.xlua_touint(L, 15);
                    bool   can_identify       = LuaAPI.lua_toboolean(L, 16);
                    uint   default_score      = LuaAPI.xlua_touint(L, 17);
                    System.Collections.Generic.List <System.Collections.Generic.List <uint> > legend_attrs = (System.Collections.Generic.List <System.Collections.Generic.List <uint> >)translator.GetObject(L, 18, typeof(System.Collections.Generic.List <System.Collections.Generic.List <uint> >));

                    xc.EquipModData __cl_gen_ret = new xc.EquipModData(id, pos, ar_con_need, ar_str_need, ar_agi_need, ar_int_need, legend_attrs_num, model, lv_step, strength_max, suit_id, pet_exp, default_extra_desc, default_star, can_identify, default_score, legend_attrs);
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to xc.EquipModData constructor!"));
        }
Beispiel #18
0
        static int _m_WriteTo(RealStatePtr L)
        {
            try {
                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    byte[] _bytes  = LuaAPI.lua_tobytes(L, 1);
                    int    _offset = LuaAPI.xlua_tointeger(L, 2);
                    uint   _num    = LuaAPI.xlua_touint(L, 3);

                    ETCold.ByteHelper.WriteTo(
                        _bytes,
                        _offset,
                        _num);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    byte[] _bytes  = LuaAPI.lua_tobytes(L, 1);
                    int    _offset = LuaAPI.xlua_tointeger(L, 2);
                    int    _num    = LuaAPI.xlua_tointeger(L, 3);

                    ETCold.ByteHelper.WriteTo(
                        _bytes,
                        _offset,
                        _num);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to ETCold.ByteHelper.WriteTo!"));
        }
Beispiel #19
0
        static int _m_LoadFromMemory_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
                {
                    byte[] _binary = LuaAPI.lua_tobytes(L, 1);

                    UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromMemory(
                        _binary);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    byte[] _binary = LuaAPI.lua_tobytes(L, 1);
                    uint   _crc    = LuaAPI.xlua_touint(L, 2);

                    UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromMemory(
                        _binary,
                        _crc);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AssetBundle.LoadFromMemory!"));
        }
Beispiel #20
0
        static int _m_ExecuteScript(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] scriptCode = LuaAPI.lua_tobytes(L, 2);

                    object __cl_gen_ret = __cl_gen_to_be_invoked.ExecuteScript(scriptCode);
                    translator.PushAny(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] scriptCode = LuaAPI.lua_tobytes(L, 2);
                    object ret;

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.ExecuteScript(scriptCode, out ret);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);
                    translator.PushAny(L, ret);



                    return(2);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KSFramework.LuaModule.ExecuteScript!"));
        }
Beispiel #21
0
        static int _m_ToByteArray(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.ObjectId gen_to_be_invoked; translator.Get(L, 1, out gen_to_be_invoked);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1)
                {
                    byte[] gen_ret = gen_to_be_invoked.ToByteArray(  );
                    LuaAPI.lua_pushstring(L, gen_ret);


                    translator.Update(L, 1, gen_to_be_invoked);


                    return(1);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    byte[] _destination = LuaAPI.lua_tobytes(L, 2);
                    int    _offset      = LuaAPI.xlua_tointeger(L, 3);

                    gen_to_be_invoked.ToByteArray(_destination, _offset);


                    translator.Update(L, 1, gen_to_be_invoked);


                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.ObjectId.ToByteArray!"));
        }
        static int _m_ReadBytes(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                FairyGUI.Utils.ByteBuffer gen_to_be_invoked = (FairyGUI.Utils.ByteBuffer)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int _count = LuaAPI.xlua_tointeger(L, 2);

                    byte[] gen_ret = gen_to_be_invoked.ReadBytes(_count);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    byte[] _output    = LuaAPI.lua_tobytes(L, 2);
                    int    _destIndex = LuaAPI.xlua_tointeger(L, 3);
                    int    _count     = LuaAPI.xlua_tointeger(L, 4);

                    byte[] gen_ret = gen_to_be_invoked.ReadBytes(_output, _destIndex, _count);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Utils.ByteBuffer.ReadBytes!"));
        }
Beispiel #23
0
        static int _m_DeserializeGraphs_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    byte[] _bytes = LuaAPI.lua_tobytes(L, 1);

                    PF.NavGraph[] gen_ret = PF.AstarDeserializer.DeserializeGraphs(_bytes);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #24
0
        static int _m_AddEvent_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Action <byte[]> __event = translator.GetDelegate <System.Action <byte[]> >(L, 1);
                    byte[] _data = LuaAPI.lua_tobytes(L, 2);

                    XLuaFramework.NetworkManager.AddEvent(__event, _data);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #25
0
        static int _m_WriteLongTo(RealStatePtr L)
        {
            try {
                {
                    byte[] _bytes  = LuaAPI.lua_tobytes(L, 1);
                    int    _offset = LuaAPI.xlua_tointeger(L, 2);
                    long   _num    = LuaAPI.lua_toint64(L, 3);

                    ETCold.ByteHelper.WriteLongTo(
                        _bytes,
                        _offset,
                        _num);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_FromBytes_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    byte[] _bytes = LuaAPI.lua_tobytes(L, 1);

                    Google.Protobuf.ByteString gen_ret = Google.Protobuf.ByteString.Unsafe.FromBytes(_bytes);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #27
0
        static int _m_DeserializeGraphsAdditive_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    PF.NavGraph[] _graphs = (PF.NavGraph[])translator.GetObject(L, 1, typeof(PF.NavGraph[]));
                    byte[]        _bytes  = LuaAPI.lua_tobytes(L, 2);

                    PF.AstarDeserializer.DeserializeGraphsAdditive(_graphs, _bytes);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #28
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    byte[] _data   = LuaAPI.lua_tobytes(L, 2);
                    int    _offset = LuaAPI.xlua_tointeger(L, 3);
                    int    _length = LuaAPI.xlua_tointeger(L, 4);

                    FairyGUI.Utils.ByteBuffer gen_ret = new FairyGUI.Utils.ByteBuffer(_data, _offset, _length);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    byte[] _data   = LuaAPI.lua_tobytes(L, 2);
                    int    _offset = LuaAPI.xlua_tointeger(L, 3);

                    FairyGUI.Utils.ByteBuffer gen_ret = new FairyGUI.Utils.ByteBuffer(_data, _offset);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] _data = LuaAPI.lua_tobytes(L, 2);

                    FairyGUI.Utils.ByteBuffer gen_ret = new FairyGUI.Utils.ByteBuffer(_data);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Utils.ByteBuffer constructor!"));
        }
Beispiel #29
0
        static int _m_LoadImage(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Texture2D __cl_gen_to_be_invoked = (UnityEngine.Texture2D)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] data = LuaAPI.lua_tobytes(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.LoadImage(data);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    byte[] data            = LuaAPI.lua_tobytes(L, 2);
                    bool   markNonReadable = LuaAPI.lua_toboolean(L, 3);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.LoadImage(data, markNonReadable);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Texture2D.LoadImage!"));
        }
        static int _m_ReadBytes(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.IO.BsonStream gen_to_be_invoked = (MongoDB.Bson.IO.BsonStream)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int _count = LuaAPI.xlua_tointeger(L, 2);

                    byte[] gen_ret = gen_to_be_invoked.ReadBytes(_count);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    byte[] _buffer = LuaAPI.lua_tobytes(L, 2);
                    int    _offset = LuaAPI.xlua_tointeger(L, 3);
                    int    _count  = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.ReadBytes(_buffer, _offset, _count);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.IO.BsonStream.ReadBytes!"));
        }