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(); } }
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(); }