public void SendMessage(string target, string msg, params object[] args) { BusinessModule module = GetModule(target); if (module != null) { module.HandleMessage(msg, args); } else { List <MessageObject> list = GetCacheMessageList(target); MessageObject msgobj = new MessageObject(); list.Add(msgobj); msgobj.target = target; msgobj.msg = msg; msgobj.args = args; } }
private void SendMessage_Internal(string target, string msg, object[] args) { BusinessModule module = GetModule(target); if (module != null) { module.HandleMessage(msg, args); } else { //将消息缓存起来 List <MessageObject> list = GetCacheMessageList(target); MessageObject obj = new MessageObject(); obj.target = target; obj.msg = msg; obj.args = args; list.Add(obj); this.LogWarning("SendMessage() target不存在!将消息缓存起来! target:{0}, msg:{1}, args:{2}", target, msg, args); } }