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