/// <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; }
/// <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 ); }
internal EndpointPool(IEnumerable <Endpoint> endpoints, EndpointRoutingStrategy routingStrategy) { AllEndpoints = endpoints.ToList(); RoutingStrategy = routingStrategy; }
internal EndpointPool(IEnumerable<Endpoint> endpoints, EndpointRoutingStrategy routingStrategy) { AllEndpoints = endpoints.ToList(); RoutingStrategy = routingStrategy; }