public void PutGetDelete()
        {
            var message = new MyMessage();

            QueueStorage.DeleteQueue(QueueName); // deleting queue on purpose
            // (it's slow but necessary to really validate the retry policy)

            QueueStorage.Put(QueueName, message);
            var retrieved = QueueStorage.Get <MyMessage>(QueueName, 1).First();

            Assert.AreEqual(message.MyGuid, retrieved.MyGuid, "#A01");

            QueueStorage.Delete(retrieved);
        }
Esempio n. 2
0
 /// <summary>Put a message on a queue (derived from the message type T), but keep it invisible for a delay.</summary>
 public static void PutWithDelay <T>(this IQueueStorageProvider provider, T message, TimeSpan delay)
 {
     provider.Put(GetDefaultStorageName(typeof(T)), message, delay: delay);
 }
Esempio n. 3
0
 /// <summary>Put a message on a queue (derived from the message type T).</summary>
 public static void Put <T>(this IQueueStorageProvider provider, T message)
 {
     provider.Put(GetDefaultStorageName(typeof(T)), message);
 }