Esempio n. 1
0
 public ScenarioHandler(IGlobalCountersControl globalCounters, IUniqueIdGenerator <int> threadIterationIdGenerator, IScenario scenario, IIterationControl context)
 {
     _scenario                   = scenario ?? throw new ArgumentNullException(nameof(scenario));
     _context                    = context ?? throw new ArgumentNullException(nameof(context));
     _globalCounters             = globalCounters ?? throw new ArgumentNullException(nameof(globalCounters));
     _threadIterationIdGenerator = threadIterationIdGenerator ?? throw new ArgumentNullException(nameof(threadIterationIdGenerator));
 }
Esempio n. 2
0
        public ReplayScenarioHandler(IGlobalCountersControl globalCounters, IUniqueIdGenerator <int> threadIterationIdGenerator, IReplayScenario <TData> scenario, IIterationControl context)
            : base(globalCounters, threadIterationIdGenerator, scenario, context)
        {
            _scenario = scenario;

            _dataContext = new DataContext <TData>
            {
                Timer   = context.Timer,
                Execute = true,
                Context = context
            };
        }
        public ReplayScenarioHandlerFactory(IFactory <IReplayScenario <TData> > scenarioFactory, IGlobalCountersControl globalCounters)
        {
            if (scenarioFactory == null)
            {
                throw new ArgumentNullException(nameof(scenarioFactory));
            }
            if (globalCounters == null)
            {
                throw new ArgumentNullException(nameof(globalCounters));
            }

            _scenarioFactory = scenarioFactory;
            _globalCounters  = globalCounters;
        }
Esempio n. 4
0
        public ScenarioHandlerFactory(IFactory <IScenario> factory, IGlobalCountersControl globalCounters)
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }
            if (globalCounters == null)
            {
                throw new ArgumentNullException(nameof(globalCounters));
            }

            _factory        = factory;
            _globalCounters = globalCounters;
        }