protected void ConsumeHandledNotification(IMessageHandledNotification notification) { _Logger.InfoFormat("Handle notification, commandID:{0}", notification.MessageID); CommandState commandState; if (CommandStateQueue.TryGetValue(notification.MessageID, out commandState)) { if (commandState.LinearCommandConsumer != null) { commandState.LinearCommandConsumer.CommandHandled(); if (commandState.LinearCommandConsumer.Payload == 0) { LinearCommandStates.TryRemove(commandState.LinearCommandConsumer.LinearKey); } } else { commandState.CommandConsumer.CommandHandled(); } CommandStateQueue.Remove(notification.MessageID); } var notificationSender = GetReplySender(commandState.FromEndPoint); if (notificationSender != null) { notificationSender.SendFrame(new MessageHandledNotification(notification.MessageID) .GetFrame()); _Logger.InfoFormat("send notification, commandID:{0}", notification.MessageID); } }
public static Frame GetFrame(this IMessageHandledNotification message) { return(message.GetFrame((short)MessageCode.MessageHandledNotification)); }