Exemplo n.º 1
0
    /// <summary>
    /// Convert the internal message data into a decoded message. This will
    /// throw an exception if the message is not yet complete.
    /// </summary>
    public IProtocolMessage getMessage()
    {
        if (IsComplete() == false)
        {
            throw new InvalidOperationException("Message is not complete yet");
        }

        return(ProtocolMessageFactory.from_data(msgData));
    }
Exemplo n.º 2
0
 /// <summary>
 /// Test the factory.
 /// </summary>
 /// <param name="message">The message.</param>
 public void TestFactory(ProtocolMessage message)
 {
     ProtocolMessageFactory factory  = new ProtocolMessageFactory();
     ProtocolMessage        message2 = factory.CreateMessage(new ProtocolMessageContainer(message));
 }