예제 #1
0
 /// <summary>Initializes a new instance of the <see cref="HeadersExchangeKeysBindingCreator"/> class.</summary>
 /// <param name="destination">The destination.</param>
 /// <param name="exchange">The exchange.</param>
 /// <param name="headerKeys">The header keys.</param>
 /// <param name="matchAll">The match all.</param>
 public HeadersExchangeKeysBindingCreator(DestinationConfigurer destination, HeadersExchange exchange, string[] headerKeys, bool matchAll)
 {
     AssertUtils.ArgumentNotNull(headerKeys, "headerKeys", "header key list must not be empty");
     this.headerMap = CreateMapForKeys(headerKeys);
     this.headerMap.Add("x-match", matchAll ? "all" : "any");
     this.destination = destination;
     this.exchange    = exchange;
 }
예제 #2
0
 /// <summary>Initializes a new instance of the <see cref="HeadersExchangeMapBindingCreator"/> class.</summary>
 /// <param name="destination">The Destination.</param>
 /// <param name="exchange">The Exchange.</param>
 /// <param name="headerMap">The header map.</param>
 /// <param name="matchAll">The match all.</param>
 internal HeadersExchangeMapBindingCreator(DestinationConfigurer destination, HeadersExchange exchange, IDictionary headerMap, bool matchAll)
 {
     // Assert.notEmpty(headerMap, "header map must not be empty");
     this.headerMap = new Dictionary <string, object> {
         { "x-match", matchAll ? "all" : "any" }
     };
     this.destination = destination;
     this.exchange    = exchange;
 }
예제 #3
0
 /// <summary>Initializes a new instance of the <see cref="HeadersExchangeSingleValueBindingCreator"/> class.</summary>
 /// <param name="destination">The destination.</param>
 /// <param name="exchange">The exchange.</param>
 /// <param name="key">The key.</param>
 internal HeadersExchangeSingleValueBindingCreator(DestinationConfigurer destination, HeadersExchange exchange, string key)
 {
     AssertUtils.ArgumentHasText(key, "key", "key must not be null");
     this.key = key;
 }
예제 #4
0
 /// <summary>Initializes a new instance of the <see cref="HeadersExchangeMapConfigurer"/> class.</summary>
 /// <param name="destination">The destination.</param>
 /// <param name="exchange">The exchange.</param>
 internal HeadersExchangeMapConfigurer(DestinationConfigurer destination, HeadersExchange exchange)
 {
     this.destination = destination;
     this.exchange    = exchange;
 }
예제 #5
0
 /// <summary>The to.</summary>
 /// <param name="exchange">The exchange.</param>
 /// <returns>The headers exchange map configurer.</returns>
 public HeadersExchangeMapConfigurer To(HeadersExchange exchange)
 {
     return(new HeadersExchangeMapConfigurer(this, exchange));
 }