public int Set(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 4) { object arg0 = ToLua.CheckVarObject(L, 2, kclass); object arg1 = ToLua.ToVarObject(L, 3); if (arg1 != null) { arg1 = TypeChecker.ChangeType(arg1, property.PropertyType); } object[] arg2 = ToLua.CheckObjectArray(L, 4); property.SetValue(arg0, arg1, arg2); return(0); } else if (count == 7) { object arg0 = ToLua.CheckVarObject(L, 2, kclass); object arg1 = ToLua.ToVarObject(L, 3); if (arg1 != null) { arg1 = TypeChecker.ChangeType(arg1, property.PropertyType); } BindingFlags arg2 = (BindingFlags)LuaDLL.luaL_checknumber(L, 4); Binder arg3 = (Binder)ToLua.CheckObject(L, 5, typeof(Binder)); object[] arg4 = ToLua.CheckObjectArray(L, 6); CultureInfo arg5 = (CultureInfo)ToLua.CheckObject(L, 7, typeof(CultureInfo)); property.SetValue(arg0, arg1, arg2, arg3, arg4, arg5); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaInterface.LuaProperty.Set")); } }
public double LuaCheckNumber(int stackPos) { return(LuaDLL.luaL_checknumber(L, stackPos)); }
public float CheckFloat(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToSingle(ret)); }
public decimal CheckDecimal(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToDecimal(ret)); }
public uint CheckUInt32(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToUInt32(ret)); }
public char CheckChar(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToChar(ret)); }
public short CheckInt16(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToInt16(ret)); }
public byte CheckByte(IntPtr L, int stackPos) { double ret = LuaDLL.luaL_checknumber(L, stackPos); return(Convert.ToByte(ret)); }