Esempio n. 1
0
 public byte[] Serialize(AirlockMessage message)
 {
     using (var stream = new MemoryStream())
         using (var writer = new SimpleAirlockBinaryWriter(stream))
         {
             writer.Write((short)1);
             writer.WriteCollection(message.EventGroups, SerializeEventGroup);
             writer.Flush();
             return(stream.ToArray());
         }
 }
 public SimpleAirlockSink()
 {
     _writeStream = new MemoryStream();
     _writer      = new SimpleAirlockBinaryWriter(WriteStream);
 }