예제 #1
0
        public ImportProcess(int millisecondsToSleep, IIntervalCalculator intervalCalculator,
                             IHashingAlgorithm hashingAlgorithm,
                             IApiEndPointService apiEndPointService,
                             INewRelicService newRelicService,
                             IRootObjectService rootObjectService,
                             IEventService eventService)
        {
            _millisecondsToSleep = millisecondsToSleep;
            _intervalCalculator  = intervalCalculator;
            _hashingAlgorithm    = hashingAlgorithm;
            _newRelicService     = newRelicService;
            _rootObjectService   = rootObjectService;
            _eventService        = eventService;
            _apiEndPointService  = apiEndPointService;

            HistoricalEvents   = _eventService.GetEvents()?.ToList();
            HistoricalWorkLoad = new Stack <NewRelicHttpRequest>();
            CurrentWorkLoad    = new Stack <NewRelicHttpRequest>();

            Console.WriteLine("ImportProcess created.");
        }
예제 #2
0
 protected BaseTask(IIntervalCalculator intervalCalculator, string name)
 {
     this.intervalCalculator = intervalCalculator;
     Name = name;
 }
예제 #3
0
 protected BaseTask(IIntervalCalculator intervalCalculator)
 {
     this.intervalCalculator = intervalCalculator;
     Name = GetType().Name;
 }