public static void SafeInvoke(this NetEventCallback callback, INetEventObject message) { if (callback != null) { callback.Invoke(message); } }
static int set_onEvent(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetSocket obj = (NetSocket)o; NetEventCallback arg0 = (NetEventCallback)ToLua.CheckDelegate <NetEventCallback>(L, 2); obj.onEvent = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onEvent on a nil value")); } }
static int get_onEvent(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetSocket obj = (NetSocket)o; NetEventCallback ret = obj.onEvent; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onEvent on a nil value")); } }