Exemplo n.º 1
0
 private Envelope outgoingMessage()
 {
     return(new Envelope
     {
         EnvelopeVersionId = PersistedMessageId.GenerateRandom(),
         Destination = destination,
         Data = new byte[] { 1, 2, 3, 4, 5, 6, 7 },
         Queue = "outgoing",
         SentAt = DateTime.Today.ToUniversalTime()
     });
 }
        public serialization_and_deserialization_of_single_message()
        {
            outgoing = new Envelope
            {
                SentAt            = DateTime.Today.ToUniversalTime(),
                EnvelopeVersionId = PersistedMessageId.GenerateRandom(),
                Queue             = "incoming",
                Data         = new byte[] { 1, 5, 6, 11, 2, 3 },
                Destination  = "durable://localhost:2222/incoming".ToUri(),
                SentAttempts = 2,
                DeliverBy    = DateTime.Today.ToUniversalTime(),
                ReplyUri     = "durable://localhost:2221/replies".ToUri()
            };

            outgoing.Headers.Add("name", "Jeremy");
            outgoing.Headers.Add("state", "Texas");
        }