示例#1
0
 public static void SafeInvoke(this NetEventCallback callback, INetEventObject message)
 {
     if (callback != null)
     {
         callback.Invoke(message);
     }
 }
示例#2
0
    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"));
        }
    }
示例#3
0
    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"));
        }
    }