Ejemplo n.º 1
0
 public Letter(string exchange, string routingKey, byte[] data, LetterMetadata metadata = null, RoutingOptions routingOptions = null)
 {
     Envelope = new Envelope
     {
         Exchange       = exchange,
         RoutingKey     = routingKey,
         RoutingOptions = routingOptions ?? RoutingOptions.CreateDefaultRoutingOptions()
     };
     Body           = data;
     LetterMetadata = metadata ?? new LetterMetadata();
 }
Ejemplo n.º 2
0
 public Letter(string exchange, string routingKey, byte[] data, string id, RoutingOptions routingOptions = null)
 {
     Envelope = new Envelope
     {
         Exchange       = exchange,
         RoutingKey     = routingKey,
         RoutingOptions = routingOptions ?? RoutingOptions.CreateDefaultRoutingOptions()
     };
     Body = data;
     if (!string.IsNullOrWhiteSpace(id))
     {
         LetterMetadata = new LetterMetadata {
             Id = id
         };
     }
     else
     {
         LetterMetadata = new LetterMetadata();
     }
 }