Exemplo n.º 1
0
 /// <summary>
 ///     Defines the type of endpoint routing to use. Defaults to <see cref="EndpointRoutingStrategy.First" />.
 /// </summary>
 /// <exception cref="ArgumentNullException"><paramref name="routingStrategy" /> is <c>null</c>.</exception>
 public Builder WithRoutingStrategy(EndpointRoutingStrategy routingStrategy)
 {
     if (routingStrategy == null)
     {
         throw new ArgumentNullException("routingStrategy");
     }
     _routingStrategy = routingStrategy;
     return this;
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Defines the type of endpoint routing to use. Defaults to <see cref="EndpointRoutingStrategy.First" />.
 /// </summary>
 /// <exception cref="ArgumentNullException"><paramref name="routingStrategy" /> is <c>null</c>.</exception>
 public Builder WithRoutingStrategy(EndpointRoutingStrategy routingStrategy)
 {
     if (routingStrategy == null)
     {
         throw new ArgumentNullException(nameof(routingStrategy));
     }
     _routingStrategy = routingStrategy;
     return(this);
 }
 protected EndpointPool CreateSut(EndpointRoutingStrategy strategy = null, params Endpoint[] endpoints)
 {
     return new EndpointPool(
         endpoints == null || !endpoints.Any()
             ? new[] {Endpoint1, Endpoint2, Endpoint3, Endpoint4, Endpoint5}
             : endpoints,
         strategy ?? RoutingStrategy
         );
 }
Exemplo n.º 4
0
 internal EndpointPool(IEnumerable <Endpoint> endpoints, EndpointRoutingStrategy routingStrategy)
 {
     AllEndpoints    = endpoints.ToList();
     RoutingStrategy = routingStrategy;
 }
Exemplo n.º 5
0
 internal EndpointPool(IEnumerable<Endpoint> endpoints, EndpointRoutingStrategy routingStrategy)
 {
     AllEndpoints = endpoints.ToList();
     RoutingStrategy = routingStrategy;
 }