static int set_OnClosed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o; BestHTTP.WebSocket.OnWebSocketClosedDelegate arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (BestHTTP.WebSocket.OnWebSocketClosedDelegate)ToLua.CheckObject(L, 2, typeof(BestHTTP.WebSocket.OnWebSocketClosedDelegate)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(BestHTTP.WebSocket.OnWebSocketClosedDelegate), func) as BestHTTP.WebSocket.OnWebSocketClosedDelegate; } obj.OnClosed = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnClosed on a nil value" : e.Message)); } }
static int get_OnClosed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o; BestHTTP.WebSocket.OnWebSocketClosedDelegate ret = obj.OnClosed; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnClosed on a nil value" : e.Message)); } }
static int set_OnClosed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o; BestHTTP.WebSocket.OnWebSocketClosedDelegate arg0 = (BestHTTP.WebSocket.OnWebSocketClosedDelegate)ToLua.CheckDelegate <BestHTTP.WebSocket.OnWebSocketClosedDelegate>(L, 2); obj.OnClosed = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index OnClosed on a nil value")); } }