Beispiel #1
0
        public MessageStream AsStream()
        {
            MessageStream stream = new MessageStream();

            stream.AddMessage(this);
            return(stream);
        }
        protected override IEnumerable <Message> Deserialize(BinaryReader reader)
        {
            int sz = reader.ReadInt32();

            MessageStream stream = new MessageStream();

            for (int i = 0; i < sz; i++)
            {
                stream.AddMessage(DeserializeMessage(reader));
            }

            return(stream);
        }