/// <summary> /// This method is called by a MessageIterator to let this object try /// to handle the received message. /// </summary> /// <param name="message">The received message.</param> /// <returns>Returns true if this object has handled the message, otherwise false.</returns> internal bool HandleMessage(Message message) { bool handled = false; if (message is DulMessage) { handled = HandleDulMessage(message as DulMessage); } else if (message is DicomMessage) { handled = HandleDicomMessage(message as DicomMessage); } else { Debug.Assert(true, "Not supposed to get here."); } return(handled); }
/// <summary> /// This method is called after a Message has been received but before it /// (possibly) will be handled by the (zero or more) MessageHandler objects that /// are attached to this object. /// </summary> /// <param name="message">The received message.</param> private void BeforeHandlingMessage(Message message) { if (message is DulMessage) { BeforeHandlingDulMessage(message as DulMessage); } else if (message is DicomMessage) { BeforeHandlingDicomMessage(message as DicomMessage); } else { Debug.Assert(true, "Not supposed to get here."); } }