예제 #1
0
 public static void SendMessage(string msgType, KeyValuesUpdate kv)
 {
     if (dicMsgs.TryGetValue(msgType, out DelMessageDelivery del))
     {
         del?.Invoke(kv);
     }
 }
예제 #2
0
        /// <summary>
        /// 发送方法
        /// </summary>
        /// <param name="name">消息类型</param>
        /// <param name="msgName">消息名称</param>
        /// <param name="msgContent">消息内容</param>
        protected void SendMsg(string msgType, string msgName, object msgContent)
        {
            KeyValuesUpdate kv = new KeyValuesUpdate(msgName, msgContent);

            MessageCenter.SendMessage(msgType, kv);
        }