public TurnEndingJob(UnderSeaDatabaseContext context, ITurnHandlingService handler, IHubContext <UnderSeaHub> hub, ICountryService service, IUserTracker tracker) { Context = context ?? throw new ArgumentNullException(nameof(context)); Handler = handler ?? throw new ArgumentNullException(nameof(handler)); Hub = hub ?? throw new ArgumentNullException(nameof(hub)); Service = service ?? throw new ArgumentNullException(nameof(service)); Tracker = tracker ?? throw new ArgumentNullException(nameof(tracker)); }
public async Task Initialize() { context = await UtilityFactory.CreateContextAsync(); turnService = new TurnHandlingService(new ModifierParserContainer(new AbstractEffectModifierParser[] { new BarrackSpaceEffectParser(), new CoralProductionEffectParser(), new PearlProductionEffectParser(), new HarvestModifierEffectParser(), new PopulationEffectParser(), new TaxModifierEffectParser(), new UnitDefenseEffectParser(), new UnitAttackEffectParser(), new AddBuildingEffectParser(), new IncreaseUnitAttackEffectParser(), new BuildingCoralProductionEffectParser() })); }
public MaintenanceController(ITurnHandlingService handler, UnderSeaDatabaseContext database) { Handler = handler ?? throw new ArgumentNullException(nameof(handler)); Database = database ?? throw new ArgumentNullException(nameof(database)); }
public async Task Initialize() { context = await UtilityFactory.CreateContextAsync(); turnService = new TurnHandlingService(ModifierParserContainer.CreateDefault(), new AsyncReaderWriterLock()); }