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