Exemplo n.º 1
0
 public virtual IEnumerator Live(Animal script, TimeController timeController, byte[] stagePreps, byte[] stageEvents)
 {
     foreach (byte preparation in stagePreps)
     {
         GetPrep(preparation)(script);
     }
     while ((stageDays - livedDays) > 0)
     {
         byte dayThirds = 0;
         while (dayThirds < 3)
         {
             float thirdDuration = timeController.TimeSpeedMinuteSecs / Random.Range(2.5f, 3.2f);
             if (!script.busy)
             {
                 foreach (byte myEvent in stageEvents)
                 {
                     GetEvent(myEvent)(script, thirdDuration);
                 }
             }
             dayThirds++;
             yield return(new WaitForSeconds(thirdDuration));
         }
         livedDays++;
     }
     script.lifeStage = GetNextStage(script.lifeStage);
     LifeStage.InitStage(script, timeController);
 }
Exemplo n.º 2
0
        public EventModelDto Get(Guid id)
        {
            var eventQuery = new GetEvent(id);
            var model      = _eventsQueryHandler.Handle(eventQuery);

            return(model);
        }
Exemplo n.º 3
0
        public GetEventTests()
        {
            this.Database = new MockSponsorServiceDatabase();

            IConfiguration config = Mock.Create <IConfiguration>();

            this.Controller = new GetEvent(config, this.Database);
        }
Exemplo n.º 4
0
        public async Task <Event> Get(GetEvent request)
        {
            request.CompanyUid = await _currentCompanyProvider.GetCompanyUid();

            request.UserUid = _currentUserProvider.GetUserUid();

            return(await _mediator.Send(request));
        }
Exemplo n.º 5
0
        public EventModelDto Get(Guid id)
        {
            var eventQuery = new GetEvent(id);
            var eventModel = _eventsQueryHandler.Handle(eventQuery);

            eventModel.Users = _getPlayersQuery.Handle();

            return(eventModel);
        }
Exemplo n.º 6
0
        private void UpdateViews()
        {
            DelSheduleText.Items.Clear();
            SheduleData.Rows.Clear();
            GetEvent events   = new GetEvent();
            var      shedules = events.Get();

            foreach (Event shedule in shedules)
            {
                SheduleData.Rows.Add(shedule.CODE,
                                     shedule.EventText,
                                     shedule.Date);
                DelSheduleText.Items.Add(shedule.EventText);
            }
        }
 public R this[P parm]
 {
     get { return(GetEvent.Invoke(parm)); }
     set { SetEvent.Invoke(parm, value); }
 }
Exemplo n.º 8
0
 public async Task <Employee> Handle(GetEvent <Employee> request, CancellationToken cancellationToken)
 {
     return(await _repository.GetById(request.Id));
 }
 internal static EventInfo?Find(ExpressionSyntax expression, SemanticModel semanticModel, CancellationToken cancellationToken)
 {
     if (GetEvent.Match(expression, semanticModel, cancellationToken) is { Member : { ReflectedType : { } reflectedType, Symbol : IEventSymbol symbol } })