/// <summary> /// 接收活动消息 /// </summary> /// <param name="message">接收到的活动消息,管理器负责在接收器同步上下文上执行其接收方法</param> private void ReceiveActivityMessage(CO_IA.Data.ActivityMessage message) { lock (syncObj) { foreach (var msgReceiver in this.receiverList) { this.GetReceiverSyncContext(msgReceiver).Post(stateObj => { msgReceiver.Receive(message); }, null); } } }
/// <summary> /// 接收消息 /// </summary> /// <param name="message">接收到的消息</param> public static void ReceiveMessage(CO_IA.Data.ActivityMessage message) { Current.ReceiveActivityMessage(message); }