Example #1
0
 static int RegisterSerializeFunc(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Action <System.IO.Stream, Protocols.ProtoBody> arg0 = (System.Action <System.IO.Stream, Protocols.ProtoBody>)ToLua.CheckDelegate <System.Action <System.IO.Stream, Protocols.ProtoBody> >(L, 1);
         Protocols.ProtoBody.DeserializeFunc arg1 = (Protocols.ProtoBody.DeserializeFunc)ToLua.CheckDelegate <Protocols.ProtoBody.DeserializeFunc>(L, 2);
         Protocols.ProtoBody.RegisterSerializeFunc(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #2
0
    public Protocols.ProtoBody.DeserializeFunc Protocols_ProtoBody_DeserializeFunc(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            Protocols.ProtoBody.DeserializeFunc fn = delegate(System.IO.Stream param0, System.Type param1) { return(null); };
            return(fn);
        }

        if (!flag)
        {
            Protocols_ProtoBody_DeserializeFunc_Event target = new Protocols_ProtoBody_DeserializeFunc_Event(func);
            Protocols.ProtoBody.DeserializeFunc       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            Protocols_ProtoBody_DeserializeFunc_Event target = new Protocols_ProtoBody_DeserializeFunc_Event(func, self);
            Protocols.ProtoBody.DeserializeFunc       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Example #3
0
 void Push_Protocols_ProtoBody_DeserializeFunc(IntPtr L, Protocols.ProtoBody.DeserializeFunc o)
 {
     ToLua.Push(L, o);
 }