public void Post(RelayMessage message, short waitId) { if (Log.IsDebugEnabled) { Log.DebugFormat("Post() Port posts message to DispatcherQueue '{0}' (TypeId={1}, MessageId={2})" , dispatcherQueue.Name, message.TypeId, message.Id); } QueueItem queueItem = new QueueItem(); queueItem.WaitId = waitId; queueItem.Message = message; messagePort.Post(queueItem); }
void PostMessage(QueueItem queueItem) { short waitId = queueItem.WaitId; RelayMessage message = queueItem.Message; PostMessage(message); switch (message.MessageType) { case MessageType.Get: case MessageType.SaveWithConfirm: case MessageType.UpdateWithConfirm: case MessageType.DeleteWithConfirm: case MessageType.DeleteAllInTypeWithConfirm: case MessageType.DeleteAllWithConfirm: case MessageType.DeleteInAllTypesWithConfirm: case MessageType.NotificationWithConfirm: case MessageType.IncrementWithConfirm: int i = GetQueueIndex(message.TypeId, message.Id); queues[i].ReleaseWait(waitId); break; } }