Ejemplo n.º 1
0
        public MessageMetadata parseNextPacket()
        {
            try
            {
                if (firstPacket)
                {
                    firstPacket = false;
                    HistoryStartPacket hsp = new HistoryStartPacket(innerDataStream);
                }

                MessageMetadata mmd = new MessageMetadata(innerDataStream);
                MessageContent mc = new MessageContent(innerDataStream);    // that's kind of redundant, but we still need to parse it, otherwise
                                                                            // the next call to parseNextPacket will fail
                mmd.selectTextFromContentPacket(mc);

                return mmd;
            }
            catch (EndOfStreamException)
            {
                return null;
            }
        }
Ejemplo n.º 2
0
 internal void selectTextFromContentPacket(MessageContent mc)
 {
     if (string.IsNullOrEmpty(Text))
         Text = mc.Text;
 }