Beispiel #1
0
        public void Consume(Message message)
        {
            message.Source = _envelope.ReceivedAt;
            message.Envelope = _envelope;

            MessageHistory.Record(MessageTrack.ForReceived(message, message.Id.ToString()));
        }
        public void store_and_find()
        {
            var message1 = new Message();
            var message2 = new Message();
            var message3 = new Message();

            var cache = new SagaStateCache<Message>();
            cache.Store(message1.Id, message1);
            cache.Store(message2.Id, message2);
            cache.Store(message3.Id, message3);

            cache.Find(message1.Id).ShouldBeTheSameAs(message1);
            cache.Find(message2.Id).ShouldBeTheSameAs(message2);
            cache.Find(message3.Id).ShouldBeTheSameAs(message3);
        }
        public void delete_from_cache()
        {
            var message1 = new Message();
            var message2 = new Message();
            var message3 = new Message();

            var cache = new SagaStateCache<Message>();
            cache.Store(message1.Id, message1);
            cache.Store(message2.Id, message2);
            cache.Store(message3.Id, message3);

            cache.Delete(message1.Id);
            cache.Find(message1.Id).ShouldBeNull();

            cache.Find(message2.Id).ShouldBeTheSameAs(message2);
            cache.Find(message3.Id).ShouldBeTheSameAs(message3);
        }
Beispiel #4
0
 protected bool Equals(Message other)
 {
     return Id.Equals(other.Id);
 }
 public Task<Message1> Other(Message message)
 {
     return null;
 }
 public Task Go(Message message)
 {
     return null;
 }
 public Task<string> Other(Message message)
 {
     return null;
 }