Exemplo n.º 1
0
        public static LoadRunnerUi BuildUi(this IStrategyBuilder builder, IValidator validator = null)
        {
            if (!(builder is IAggregatorFeature))
            {
                throw new ArgumentException("Strategy builder must support IAggrregatorFeature");
            }

            LoadRunnerUi       ui           = new LoadRunnerUi();
            IAggregatorFeature localBuilder = (IAggregatorFeature)builder.ShallowCopy();

            localBuilder.AddAggregator(ui);

            ui.Setup(localBuilder.BuildStrategy(), validator);

            return(ui);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Error handling strategy builder
 /// </summary>
 public FluentApplicationBootstrapConfiguration AddStrategyBuilder(IStrategyBuilder strategyBuilder)
 {
     StrategyBuilder = strategyBuilder;
     return(this);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initialize IStrategy from this configuration and then LoadRunnerEngine it self using it.
        /// </summary>
        /// <param name="builder">Strategy builder</param>
        public static LoadRunnerEngine Build(this IStrategyBuilder builder)
        {
            LoadRunnerEngine engine = new LoadRunnerEngine(builder.BuildStrategy());

            return(engine);
        }