コード例 #1
0
ファイル: Letter.cs プロジェクト: lsfera/RabbitMQ.Core
 public Letter(string exchange, string routingKey, byte[] data, string id, RoutingOptions routingOptions = null)
 {
     Envelope = new Envelope
     {
         Exchange       = exchange,
         RoutingKey     = routingKey,
         RoutingOptions = routingOptions ?? DefaultRoutingOptions()
     };
     Body = data;
     if (!string.IsNullOrWhiteSpace(id))
     {
         LetterMetadata = new LetterMetadata {
             Id = id
         };
     }
     else
     {
         LetterMetadata = new LetterMetadata();
     }
 }
コード例 #2
0
ファイル: Letter.cs プロジェクト: lsfera/RabbitMQ.Core
 public Letter(string exchange, string routingKey, byte[] data, LetterMetadata metadata = null, RoutingOptions routingOptions = null)
 {
     Envelope = new Envelope
     {
         Exchange       = exchange,
         RoutingKey     = routingKey,
         RoutingOptions = routingOptions ?? DefaultRoutingOptions()
     };
     Body           = data;
     LetterMetadata = metadata ?? new LetterMetadata();
 }