public void RegMsg(MsgType msgType, MsgFunc msgCB) { if (msgCB != null) { if (!msgFuncMap.ContainsKey(msgType)) { msgFuncMap[msgType] = new List <MsgFunc>(); } List <MsgFunc> msgCBList = msgFuncMap[msgType]; msgCBList.Add(msgCB); } }
public static extern void SetMsgFunc(IntPtr ctx, MsgFunc pfn, IntPtr messenger);