Пример #1
0
 public override void Save(IEvent eventObj)
 {
     if (eventObj is NewStepEvent ev)
     {
         StepsRepo.Create(new Steps
         {
             SessionId = DatabaseEventRecordingProvider.GameSessionId,
             Number    = ev.StepNumber
         });
         DatabaseEventRecordingProvider.StepId = StepsRepo.GetStepId(ev.StepNumber);
     }
     else
     {
         throw new InvalidDataException($"{eventObj} is invalid event");
     }
 }
Пример #2
0
 public GettingPregnantSaver(LifeGameDBContext context, StepsRepo stepsRepo, EventsRepo eventsRepo,
                             GameObjectsStepStateRepo gameObjectsStepStateRepo) : base(context, stepsRepo, eventsRepo, gameObjectsStepStateRepo)
 {
 }
Пример #3
0
 public ReproductionSaver(LifeGameDBContext context, StepsRepo stepsRepo, EventsRepo eventsRepo,
                          GameObjectsStepStateRepo gameObjectsStepStateRepo) : base(context, stepsRepo, eventsRepo, gameObjectsStepStateRepo)
 {
 }
Пример #4
0
 public StepSaver(LifeGameDBContext context, StepsRepo stepsRepo) : base(context, stepsRepo)
 {
 }
Пример #5
0
 public GivingBirthSaver(LifeGameDBContext context, StepsRepo stepsRepo, EventsRepo eventsRepo,
                         GameObjectsStepStateRepo gameObjectsStepStateRepo) : base(context, stepsRepo, eventsRepo, gameObjectsStepStateRepo)
 {
 }
Пример #6
0
 public MapGenerationSaver(LifeGameDBContext context, StepsRepo stepsRepo, GameTilesRepo gameTilesRepo)
     : base(context, stepsRepo)
 {
     _gameTilesRepo = gameTilesRepo;
 }
Пример #7
0
 public PregnancyProgressionSaver(LifeGameDBContext context, StepsRepo stepsRepo, EventsRepo eventsRepo,
                                  GameObjectsStepStateRepo gameObjectsStepStateRepo) : base(context, stepsRepo, eventsRepo, gameObjectsStepStateRepo)
 {
 }
Пример #8
0
 protected ActionEventSaver(LifeGameDBContext context, StepsRepo stepsRepo, EventsRepo eventsRepo,
                            GameObjectsStepStateRepo gameObjectsStepStateRepo) : base(context, stepsRepo)
 {
     EventsRepo = eventsRepo;
     GameObjectsStepStateRepo = gameObjectsStepStateRepo;
 }
Пример #9
0
 protected StepEventSaver(LifeGameDBContext context, StepsRepo stepsRepo) : base(context)
 {
     StepsRepo = stepsRepo;
 }