Exemplo n.º 1
0
        internal void Process(ISequencingBufferEntry <Byte[]> byteArrayEntry)
        {
            Payload payload = BinarySerializer.DeSerialize <Payload>(byteArrayEntry.Value);

            if (!_producerMessageCounter.ContainsKey(payload.Producer))
            {
                _producerMessageCounter.Add(payload.Producer, 0);
            }

            _producerMessageCounter[payload.Producer]++;
        }
Exemplo n.º 2
0
 /// <summary>unmarshals an object from the HAL virtual port stream</summary>
 /// <param name="o">Object to unmarshal</param>
 public void Read(object o)
 {
     BinarySerializer.DeSerialize(o, Port);
 }
Exemplo n.º 3
-1
        private void ConsumerReceived(IBasicConsumer sender, BasicDeliverEventArgs args)
        {
            var serializer = new BinarySerializer<string>();
            var message = serializer.DeSerialize(args.Body);

            OnMessageReceived(message);
        }