Ejemplo n.º 1
0
        public IEnumerator TimersExecuteInOrder()
        {
            int id = 0;

            _timerService.StartTimer(delegate
            {
                Assert.That(id == 1);
                id++;
            }, 0.1f);

            _timerService.StartTimer(delegate
            {
                Assert.That(id == 0);
                id++;
            }, 0.05f);

            _timerService.StartTimer(delegate
            {
                Assert.That(id == 2);
                id++;
            }, 0.15f);

            yield return(new WaitForSeconds(0.2f));

            Assert.That(id == 3);
        }
Ejemplo n.º 2
0
 public void Handle(GameWeekStartedEvent domainEvent)
 {
     _timer.StartTimer(30, new GameWeekTimerEndedEvent());
     PlayGames();
     UpdateRecords();
     UpdateStandings();
 }
 public IActionResult ProccessXML(object someXMLObject)
 {
     SomeMethodWithXml(someXMLObject)
     //Reset Timer
     _timerService.StopTimer();
     _timerService.StartTimer();
     return(Ok());
 }
Ejemplo n.º 4
0
        public void Handle(DivChampPhaseEvent domainEvent)
        {
            _timerService.StartTimer(10, new PhaseTimerEndedEvent());

            var standings = _season.Standings;

            standings.EastChamp = CalcFirstPlace(standings.EastStandings);
            standings.WestChamp = CalcFirstPlace(standings.WestStandings);
            _repository.Update(standings);
        }
Ejemplo n.º 5
0
 public void Handle(ChampPhaseEvent domainEvent)
 {
     _timerService.StartTimer(10, new PhaseTimerEndedEvent());
     DetermineChampion();
 }
Ejemplo n.º 6
0
 public void Handle(PreDraftPhaseEvent domainEvent)
 {
     _timerService.StartTimer(100, new PhaseTimerEndedEvent());
 }