static int _m_HasUser(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); CentralServer.User.CSUserMgr __cl_gen_to_be_invoked = (CentralServer.User.CSUserMgr)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) || LuaAPI.lua_isuint64(L, 2))) { ulong gcNID = LuaAPI.lua_touint64(L, 2); bool __cl_gen_ret = __cl_gen_to_be_invoked.HasUser(gcNID); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { uint ukey = LuaAPI.xlua_touint(L, 2); bool __cl_gen_ret = __cl_gen_to_be_invoked.HasUser(ukey); 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 CentralServer.User.CSUserMgr.HasUser!")); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 5 && 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)) { uint _u32_0 = LuaAPI.xlua_touint(L, 2); uint _u32_1 = LuaAPI.xlua_touint(L, 3); uint _u32_2 = LuaAPI.xlua_touint(L, 4); uint _u32_3 = LuaAPI.xlua_touint(L, 5); UnityEngine.Hash128 gen_ret = new UnityEngine.Hash128(_u32_0, _u32_1, _u32_2, _u32_3); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 3 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3))) { ulong _u64_0 = LuaAPI.lua_touint64(L, 2); ulong _u64_1 = LuaAPI.lua_touint64(L, 3); UnityEngine.Hash128 gen_ret = new UnityEngine.Hash128(_u64_0, _u64_1); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(UnityEngine.Hash128)); 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.Hash128 constructor!")); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 5 && translator.Assignable <Casinos.TimerShaft>(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)) && (LuaAPI.lua_isnil(L, 4) || LuaAPI.lua_type(L, 4) == LuaTypes.LUA_TTABLE) && translator.Assignable <Casinos.DelegateLua2>(L, 5)) { Casinos.TimerShaft _timer_shaft = (Casinos.TimerShaft)translator.GetObject(L, 2, typeof(Casinos.TimerShaft)); ulong _tm = LuaAPI.lua_touint64(L, 3); XLua.LuaTable _lua_table = (XLua.LuaTable)translator.GetObject(L, 4, typeof(XLua.LuaTable)); Casinos.DelegateLua2 _cb = translator.GetDelegate <Casinos.DelegateLua2>(L, 5); Casinos.EbTimer gen_ret = new Casinos.EbTimer(_timer_shaft, _tm, _lua_table, _cb); 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 Casinos.EbTimer constructor!")); }
public static bool TryPrimitiveArraySet(Type type, RealStatePtr L, object obj, int array_idx, int obj_idx) { bool ok = true; LuaTypes lua_type = LuaAPI.lua_type(L, obj_idx); if (type == typeof(int[]) && lua_type == LuaTypes.LUA_TNUMBER) { int[] array = obj as int[]; array[array_idx] = LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(float[]) && lua_type == LuaTypes.LUA_TNUMBER) { float[] array = obj as float[]; array[array_idx] = (float)LuaAPI.lua_tonumber(L, obj_idx); } else if (type == typeof(double[]) && lua_type == LuaTypes.LUA_TNUMBER) { double[] array = obj as double[]; array[array_idx] = LuaAPI.lua_tonumber(L, obj_idx);; } else if (type == typeof(bool[]) && lua_type == LuaTypes.LUA_TBOOLEAN) { bool[] array = obj as bool[]; array[array_idx] = LuaAPI.lua_toboolean(L, obj_idx); } else if (type == typeof(long[]) && LuaAPI.lua_isint64(L, obj_idx)) { long[] array = obj as long[]; array[array_idx] = LuaAPI.lua_toint64(L, obj_idx); } else if (type == typeof(ulong[]) && LuaAPI.lua_isuint64(L, obj_idx)) { ulong[] array = obj as ulong[]; array[array_idx] = LuaAPI.lua_touint64(L, obj_idx); } else if (type == typeof(sbyte[]) && lua_type == LuaTypes.LUA_TNUMBER) { sbyte[] array = obj as sbyte[]; array[array_idx] = (sbyte)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(short[]) && lua_type == LuaTypes.LUA_TNUMBER) { short[] array = obj as short[]; array[array_idx] = (short)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(ushort[]) && lua_type == LuaTypes.LUA_TNUMBER) { ushort[] array = obj as ushort[]; array[array_idx] = (ushort)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(char[]) && lua_type == LuaTypes.LUA_TNUMBER) { char[] array = obj as char[]; array[array_idx] = (char)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(uint[]) && lua_type == LuaTypes.LUA_TNUMBER) { uint[] array = obj as uint[]; array[array_idx] = LuaAPI.xlua_touint(L, obj_idx); } else if (type == typeof(IntPtr[]) && lua_type == LuaTypes.LUA_TLIGHTUSERDATA) { IntPtr[] array = obj as IntPtr[]; array[array_idx] = LuaAPI.lua_touserdata(L, obj_idx); } else if (type == typeof(decimal[])) { decimal[] array = obj as decimal[]; if (lua_type == LuaTypes.LUA_TNUMBER) { array[array_idx] = (decimal)LuaAPI.lua_tonumber(L, obj_idx); } if (lua_type == LuaTypes.LUA_TUSERDATA) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (translator.IsDecimal(L, obj_idx)) { translator.Get(L, obj_idx, out array[array_idx]); } else { ok = false; } } else { ok = false; } } else if (type == typeof(string[]) && lua_type == LuaTypes.LUA_TSTRING) { string[] array = obj as string[]; array[array_idx] = LuaAPI.lua_tostring(L, obj_idx); } else { ok = false; } return(ok); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <GameCloud.Unity.Common.TimerShaft>(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)) && translator.Assignable <System.Action>(L, 4)) { GameCloud.Unity.Common.TimerShaft _timer_shaft = (GameCloud.Unity.Common.TimerShaft)translator.GetObject(L, 2, typeof(GameCloud.Unity.Common.TimerShaft)); ulong _tm = LuaAPI.lua_touint64(L, 3); System.Action _cb = translator.GetDelegate <System.Action>(L, 4); GameCloud.Unity.Common.EbTimer gen_ret = new GameCloud.Unity.Common.EbTimer(_timer_shaft, _tm, _cb); 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 GameCloud.Unity.Common.EbTimer constructor!")); }
private object getObject(RealStatePtr L, int idx, object target) { //return translator.getObject(L, idx); //TODO: translator.getObject move to here?? LuaTypes type = (LuaTypes)LuaAPI.lua_type(L, idx); switch (type) { case LuaTypes.LUA_TNUMBER: { if (LuaAPI.lua_isint64(L, idx)) { return(LuaAPI.lua_toint64(L, idx)); } else if (LuaAPI.lua_isinteger(L, idx)) { return(LuaAPI.xlua_tointeger(L, idx)); } else { return(LuaAPI.lua_tonumber(L, idx)); } } case LuaTypes.LUA_TSTRING: { return(LuaAPI.lua_tostring(L, idx)); } case LuaTypes.LUA_TBOOLEAN: { return(LuaAPI.lua_toboolean(L, idx)); } case LuaTypes.LUA_TTABLE: { return(getLuaTable(L, idx, null)); } case LuaTypes.LUA_TFUNCTION: { return(getLuaFunction(L, idx, null)); } case LuaTypes.LUA_TUSERDATA: { if (LuaAPI.lua_isint64(L, idx)) { return(LuaAPI.lua_toint64(L, idx)); } else if (LuaAPI.lua_isuint64(L, idx)) { return(LuaAPI.lua_touint64(L, idx)); } else { return(translator.SafeGetCSObj(L, idx)); } } default: return(null); } }
static int _m_Write(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.IO.BinaryWriter gen_to_be_invoked = (System.IO.BinaryWriter)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) { bool _value = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { byte _value = (byte)LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { sbyte _value = (sbyte)LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { char _ch = (char)LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_ch); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { double _value = LuaAPI.lua_tonumber(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { short _value = (short)LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { ushort _value = (ushort)LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _value = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { uint _value = LuaAPI.xlua_touint(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2))) { long _value = LuaAPI.lua_toint64(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { ulong _value = LuaAPI.lua_touint64(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { float _value = (float)LuaAPI.lua_tonumber(L, 2); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { byte[] _buffer = LuaAPI.lua_tobytes(L, 2); gen_to_be_invoked.Write(_buffer); return(0); } if (gen_param_count == 2 && translator.Assignable <char[]>(L, 2)) { char[] _chars = (char[])translator.GetObject(L, 2, typeof(char[])); gen_to_be_invoked.Write(_chars); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || translator.IsDecimal(L, 2))) { decimal _value; translator.Get(L, 2, out _value); gen_to_be_invoked.Write(_value); return(0); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _value = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.Write(_value); 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 _index = LuaAPI.xlua_tointeger(L, 3); int _count = LuaAPI.xlua_tointeger(L, 4); gen_to_be_invoked.Write(_buffer, _index, _count); return(0); } if (gen_param_count == 4 && translator.Assignable <char[]>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { char[] _chars = (char[])translator.GetObject(L, 2, typeof(char[])); int _index = LuaAPI.xlua_tointeger(L, 3); int _count = LuaAPI.xlua_tointeger(L, 4); gen_to_be_invoked.Write(_chars, _index, _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 System.IO.BinaryWriter.Write!")); }
static int _m_ToString_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 1 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)) { bool _value = LuaAPI.lua_toboolean(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { double _value = LuaAPI.lua_tonumber(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { float _value = (float)LuaAPI.lua_tonumber(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _value = LuaAPI.xlua_tointeger(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) || LuaAPI.lua_isint64(L, 1))) { long _value = LuaAPI.lua_toint64(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { short _value = (short)LuaAPI.xlua_tointeger(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { uint _value = LuaAPI.xlua_touint(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) || LuaAPI.lua_isuint64(L, 1))) { ulong _value = LuaAPI.lua_touint64(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { ushort _value = (ushort)LuaAPI.xlua_tointeger(L, 1); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && translator.Assignable <System.DateTime>(L, 1)) { System.DateTime _value; translator.Get(L, 1, out _value); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && translator.Assignable <System.DateTimeOffset>(L, 1)) { System.DateTimeOffset _value; translator.Get(L, 1, out _value); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) || translator.IsDecimal(L, 1))) { decimal _value; translator.Get(L, 1, out _value); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && translator.Assignable <MongoDB.Bson.Decimal128>(L, 1)) { MongoDB.Bson.Decimal128 _value; translator.Get(L, 1, out _value); string gen_ret = MongoDB.Bson.IO.JsonConvert.ToString(_value); 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 MongoDB.Bson.IO.JsonConvert.ToString!")); }
static int _m_Write(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); LitJson.JsonWriter gen_to_be_invoked = (LitJson.JsonWriter)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) { bool _boolean = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.Write(_boolean); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { double _number = LuaAPI.lua_tonumber(L, 2); gen_to_be_invoked.Write(_number); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _number = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.Write(_number); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2))) { long _number = LuaAPI.lua_toint64(L, 2); gen_to_be_invoked.Write(_number); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { ulong _number = LuaAPI.lua_touint64(L, 2); gen_to_be_invoked.Write(_number); return(0); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || translator.IsDecimal(L, 2))) { decimal _number; translator.Get(L, 2, out _number); gen_to_be_invoked.Write(_number); return(0); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _str = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.Write(_str); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to LitJson.JsonWriter.Write!")); }
static int _m_ToObject_xlua_st_(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int __gen_param_count = LuaAPI.lua_gettop(L); try { if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); byte value = (byte)LuaAPI.lua_tonumber(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); short value = (short)LuaAPI.xlua_tointeger(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); int value = LuaAPI.xlua_tointeger(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2))) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); long value = LuaAPI.lua_toint64(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); sbyte value = (sbyte)LuaAPI.xlua_tointeger(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); ushort value = (ushort)LuaAPI.xlua_tointeger(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); uint value = LuaAPI.xlua_touint(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); ulong value = LuaAPI.lua_touint64(L, 2); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(L, __cl_gen_ret); return(1); } if (__gen_param_count == 2 && translator.Assignable <System.Type>(L, 1) && translator.Assignable <object>(L, 2)) { System.Type enumType = (System.Type)translator.GetObject(L, 1, typeof(System.Type)); object value = translator.GetObject(L, 2, typeof(object)); object __cl_gen_ret = System.Enum.ToObject(enumType, value); translator.PushAny(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 System.Enum.ToObject!")); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { ulong _i = LuaAPI.lua_touint64(L, 2); XLua.Cast.UInt64 gen_ret = new XLua.Cast.UInt64(_i); 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 XLua.Cast.UInt64 constructor!")); }
static int _m_Pack_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); byte _field = (byte)LuaAPI.xlua_tointeger(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); sbyte _field = (sbyte)LuaAPI.xlua_tointeger(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); short _field = (short)LuaAPI.xlua_tointeger(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); ushort _field = (ushort)LuaAPI.xlua_tointeger(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); int _field = LuaAPI.xlua_tointeger(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); uint _field = LuaAPI.xlua_touint(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isint64(L, 3))) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); long _field = LuaAPI.lua_toint64(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3))) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); ulong _field = LuaAPI.lua_touint64(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); float _field = (float)LuaAPI.lua_tonumber(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); double _field = LuaAPI.lua_tonumber(L, 3); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || translator.IsDecimal(L, 3))) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); decimal _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Vector2 _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Vector3 _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Vector4>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Vector4 _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Color>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Color _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Quaternion _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Ray>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Ray _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Bounds>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Bounds _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TLIGHTUSERDATA == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Ray2D>(L, 3)) { System.IntPtr _buff = LuaAPI.lua_touserdata(L, 1); int _offset = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Ray2D _field; translator.Get(L, 3, out _field); bool gen_ret = XLua.CopyByValue.Pack(_buff, _offset, _field); LuaAPI.lua_pushboolean(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 XLua.CopyByValue.Pack!")); }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) || LuaAPI.lua_isuint64(L, 4))) { uint lv = LuaAPI.xlua_touint(L, 2); uint score = LuaAPI.xlua_touint(L, 3); ulong exp = LuaAPI.lua_touint64(L, 4); xc.DungeonDeadSpaceScore __cl_gen_ret = new xc.DungeonDeadSpaceScore(lv, score, exp); 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.DungeonDeadSpaceScore constructor!")); }
static int _m_ToInt64(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.Serialization.Options.RepresentationConverter gen_to_be_invoked = (MongoDB.Bson.Serialization.Options.RepresentationConverter)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)) { double _value = LuaAPI.lua_tonumber(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { float _value = (float)LuaAPI.lua_tonumber(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _value = LuaAPI.xlua_tointeger(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2))) { long _value = LuaAPI.lua_toint64(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { short _value = (short)LuaAPI.xlua_tointeger(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { uint _value = LuaAPI.xlua_touint(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { ulong _value = LuaAPI.lua_touint64(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { ushort _value = (ushort)LuaAPI.xlua_tointeger(L, 2); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || translator.IsDecimal(L, 2))) { decimal _value; translator.Get(L, 2, out _value); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(L, gen_ret); return(1); } if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.Decimal128>(L, 2)) { MongoDB.Bson.Decimal128 _value; translator.Get(L, 2, out _value); long gen_ret = gen_to_be_invoked.ToInt64(_value); LuaAPI.lua_pushint64(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.Options.RepresentationConverter.ToInt64!")); }
static int _m_LoadFromFile_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)) { string _path = LuaAPI.lua_tostring(L, 1); UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(_path); 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)) { string _path = LuaAPI.lua_tostring(L, 1); uint _crc = LuaAPI.xlua_touint(L, 2); UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(_path, _crc); translator.Push(L, gen_ret); return(1); } 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) || LuaAPI.lua_isuint64(L, 3))) { string _path = LuaAPI.lua_tostring(L, 1); uint _crc = LuaAPI.xlua_touint(L, 2); ulong _offset = LuaAPI.lua_touint64(L, 3); UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(_path, _crc, _offset); 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.LoadFromFile!")); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || translator.IsDecimal(L, 2))) { decimal _value; translator.Get(L, 2, out _value); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { double _value = LuaAPI.lua_tonumber(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { float _value = (float)LuaAPI.lua_tonumber(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _value = LuaAPI.xlua_tointeger(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2))) { long _value = LuaAPI.lua_toint64(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { uint _value = LuaAPI.xlua_touint(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2))) { ulong _value = LuaAPI.lua_touint64(L, 2); MongoDB.Bson.Decimal128 gen_ret = new MongoDB.Bson.Decimal128(_value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(MongoDB.Bson.Decimal128)); 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.Decimal128 constructor!")); }
private static object ulongCaster(RealStatePtr L, int idx, object target) { return((LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TNUMBER || LuaAPI.lua_isuint64(L, idx)) ? (object)LuaAPI.lua_touint64(L, idx) : null); }
static int _m_Insert(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Text.StringBuilder gen_to_be_invoked = (System.Text.StringBuilder)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); bool _value = LuaAPI.lua_toboolean(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); sbyte _value = (sbyte)LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); byte _value = (byte)LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); short _value = (short)LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); char _value = (char)LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); int _value = LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isint64(L, 3))) { int _index = LuaAPI.xlua_tointeger(L, 2); long _value = LuaAPI.lua_toint64(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); float _value = (float)LuaAPI.lua_tonumber(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); double _value = LuaAPI.lua_tonumber(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); ushort _value = (ushort)LuaAPI.xlua_tointeger(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); uint _value = LuaAPI.xlua_touint(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3))) { int _index = LuaAPI.xlua_tointeger(L, 2); ulong _value = LuaAPI.lua_touint64(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)) { int _index = LuaAPI.xlua_tointeger(L, 2); string _value = LuaAPI.lua_tostring(L, 3); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <char[]>(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); char[] _value = (char[])translator.GetObject(L, 3, typeof(char[])); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || translator.IsDecimal(L, 3))) { int _index = LuaAPI.xlua_tointeger(L, 2); decimal _value; translator.Get(L, 3, out _value); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <object>(L, 3)) { int _index = LuaAPI.xlua_tointeger(L, 2); object _value = translator.GetObject(L, 3, typeof(object)); var gen_ret = gen_to_be_invoked.Insert(_index, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { int _index = LuaAPI.xlua_tointeger(L, 2); string _value = LuaAPI.lua_tostring(L, 3); int _count = LuaAPI.xlua_tointeger(L, 4); var gen_ret = gen_to_be_invoked.Insert(_index, _value, _count); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <char[]>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) { int _index = LuaAPI.xlua_tointeger(L, 2); char[] _value = (char[])translator.GetObject(L, 3, typeof(char[])); int _startIndex = LuaAPI.xlua_tointeger(L, 4); int _charCount = LuaAPI.xlua_tointeger(L, 5); var gen_ret = gen_to_be_invoked.Insert(_index, _value, _startIndex, _charCount); 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.Text.StringBuilder.Insert!")); }
private bool uint64Check(RealStatePtr L, int idx) { return(LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TNUMBER || LuaAPI.lua_isuint64(L, idx)); }
public static int __NewIndexer(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (translator.Assignable <System.Collections.Concurrent.ConcurrentDictionary <long, ulong> >(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3))) { System.Collections.Concurrent.ConcurrentDictionary <long, ulong> gen_to_be_invoked = (System.Collections.Concurrent.ConcurrentDictionary <long, ulong>)translator.FastGetCSObj(L, 1); long key = LuaAPI.lua_toint64(L, 2); gen_to_be_invoked[key] = LuaAPI.lua_touint64(L, 3); LuaAPI.lua_pushboolean(L, true); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } LuaAPI.lua_pushboolean(L, false); return(1); }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 3 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)) && translator.Assignable <xc.GoodsEquip>(L, 3)) { ulong key = LuaAPI.lua_touint64(L, 2); xc.GoodsEquip value = (xc.GoodsEquip)translator.GetObject(L, 3, typeof(xc.GoodsEquip)); System.Collections.Generic.KeyValuePair <ulong, xc.GoodsEquip> __cl_gen_ret = new System.Collections.Generic.KeyValuePair <ulong, xc.GoodsEquip>(key, value); 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 System.Collections.Generic.KeyValuePair<ulong, xc.GoodsEquip> constructor!")); }
static int _m_AddOrUpdate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Collections.Concurrent.ConcurrentDictionary <long, ulong> gen_to_be_invoked = (System.Collections.Concurrent.ConcurrentDictionary <long, ulong>)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)) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)) && translator.Assignable <System.Func <long, ulong, ulong> >(L, 4)) { long _key = LuaAPI.lua_toint64(L, 2); ulong _addValue = LuaAPI.lua_touint64(L, 3); System.Func <long, ulong, ulong> _updateValueFactory = translator.GetDelegate <System.Func <long, ulong, ulong> >(L, 4); ulong gen_ret = gen_to_be_invoked.AddOrUpdate( _key, _addValue, _updateValueFactory); LuaAPI.lua_pushuint64(L, gen_ret); return(1); } if (gen_param_count == 4 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && translator.Assignable <System.Func <long, ulong> >(L, 3) && translator.Assignable <System.Func <long, ulong, ulong> >(L, 4)) { long _key = LuaAPI.lua_toint64(L, 2); System.Func <long, ulong> _addValueFactory = translator.GetDelegate <System.Func <long, ulong> >(L, 3); System.Func <long, ulong, ulong> _updateValueFactory = translator.GetDelegate <System.Func <long, ulong, ulong> >(L, 4); ulong gen_ret = gen_to_be_invoked.AddOrUpdate( _key, _addValueFactory, _updateValueFactory); LuaAPI.lua_pushuint64(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.Collections.Concurrent.ConcurrentDictionary<long, ulong>.AddOrUpdate!")); }
public static int __NewIndexer(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (translator.Assignable <System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip> >(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)) && translator.Assignable <xc.GoodsEquip>(L, 3)) { System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip> __cl_gen_to_be_invoked = (System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip>)translator.FastGetCSObj(L, 1); ulong key = LuaAPI.lua_touint64(L, 2); __cl_gen_to_be_invoked[key] = (xc.GoodsEquip)translator.GetObject(L, 3, typeof(xc.GoodsEquip)); LuaAPI.lua_pushboolean(L, true); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } LuaAPI.lua_pushboolean(L, false); return(1); }
static int _m_GetBytes_xlua_st_(RealStatePtr L) { try { int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 1 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)) { bool _value = LuaAPI.lua_toboolean(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { char _value = (char)LuaAPI.xlua_tointeger(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { short _value = (short)LuaAPI.xlua_tointeger(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _value = LuaAPI.xlua_tointeger(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) || LuaAPI.lua_isint64(L, 1))) { long _value = LuaAPI.lua_toint64(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { ushort _value = (ushort)LuaAPI.xlua_tointeger(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { uint _value = LuaAPI.xlua_touint(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) || LuaAPI.lua_isuint64(L, 1))) { ulong _value = LuaAPI.lua_touint64(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { float _value = (float)LuaAPI.lua_tonumber(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); LuaAPI.lua_pushstring(L, gen_ret); return(1); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { double _value = LuaAPI.lua_tonumber(L, 1); byte[] gen_ret = System.BitConverter.GetBytes(_value); 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 System.BitConverter.GetBytes!")); }