static int set_NetErrorCallback(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetCore.Net obj = (NetCore.Net)o; NetCore.Net.NetError arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (NetCore.Net.NetError)ToLua.CheckObject(L, 2, typeof(NetCore.Net.NetError)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(NetCore.Net.NetError), func) as NetCore.Net.NetError; } obj.NetErrorCallback = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index NetErrorCallback on a nil value" : e.Message)); } }
static int pushNetTask(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); NetCore.Net obj = (NetCore.Net)ToLua.CheckObject(L, 1, typeof(NetCore.Net)); NetCore.Net.NetError arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (NetCore.Net.NetError)ToLua.CheckObject(L, 2, typeof(NetCore.Net.NetError)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(NetCore.Net.NetError), func) as NetCore.Net.NetError; } obj.pushNetTask(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static Delegate NetCore_Net_NetError(LuaFunction func) { if (func == null) { NetCore.Net.NetError fn = delegate { }; return(fn); } NetCore.Net.NetError d = (new NetCore_Net_NetError_Event(func)).Call; return(d); }
static int get_NetErrorCallback(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetCore.Net obj = (NetCore.Net)o; NetCore.Net.NetError ret = obj.NetErrorCallback; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index NetErrorCallback on a nil value" : e.Message)); } }