Beispiel #1
0
        /// <summary>
        /// 设置等待响应状态
        /// </summary>
        /// <param name="messageId">消息id</param>
        /// <param name="response">响应实体</param>
        public void Set(string messageId, MessageResponse response)
        {
            ResponseWait wait = _waits[messageId];

            wait.Response = response;
            wait.Set();
        }
Beispiel #2
0
        /// <summary>
        /// 设置等待响应状态
        /// </summary>
        /// <param name="channelId">信道Id</param>
        /// <param name="response">响应实体</param>
        public void SetByChannelId(string channelId, MessageResponse response)
        {
            string       messageId = _messageChannelMap[channelId];
            ResponseWait wait      = _waits[messageId];

            response.MessageId = messageId;
            wait.Response      = response;
            wait.Set();
        }