コード例 #1
0
        public WorldService(ICompanyEmployeeRepository companyEmployeeRepository, IContractRepository contractRepository, IContractService contractService,
                            ICitizenRepository citizenRepository, IConfigurationRepository configurationRepository, IEquipmentRepository equipmentRepository,
                            IPartyService partyService, ICongressCandidateService congressCandidateService, ICongressVotingService congressVotingService,
                            ICountryService countryService, IBattleService battleService, IRegionService regionService, ICompanyService companyService,
                            IEmbargoService embargoService, IWarService warService, IEmployeeService employeeService, IMPPService mppService, IWalletService walletService,
                            INewDayRepository newDayRepository, IHotelService hotelService, IHouseService houseService)
        {
            this.citizenRepository         = citizenRepository;
            this.configurationRepository   = configurationRepository;
            this.equipmentRepository       = equipmentRepository;
            this.companyEmployeeRepository = companyEmployeeRepository;
            this.contractRepository        = contractRepository;
            this.contractService           = contractService;
            this.partyService             = partyService;
            this.congressCandidateService = congressCandidateService;
            this.congressVotingService    = congressVotingService;
            this.countryService           = countryService;
            this.battleService            = battleService;
            this.regionService            = regionService;
            this.companyService           = companyService;
            this.embargoService           = embargoService;
            this.warService       = warService;
            this.employeeService  = employeeService;
            this.mppService       = mppService;
            this.walletService    = Attach(walletService);
            this.newDayRepository = newDayRepository;
            this.hotelService     = hotelService;
            this.houseService     = houseService;

            citizenRepository.SetTimeout(300);
            equipmentRepository.SetTimeout(300);
        }
コード例 #2
0
 public DebugController(IPopupService popupService, ICountryRepository countryRepository, ICongressVotingService congressVotingService,
                        ICongressVotingRepository congressVotingRepository, IBattleService battleService, IBattleRepository battleRepository,
                        ICompanyService companyService, IWalletService walletService, IMarketService marketService, IEquipmentService equipmentService,
                        ITransactionScopeProvider transactionScopeProvider, ICompanyRepository companyRepository, IEquipmentRepository equipmentRepository,
                        IHotelRepository hotelRepository, IMahService mahService, IHouseService houseService, IHouseRepository houseRepository,
                        HouseDayChangeProcessor houseDayChangeProcessor) : base(popupService)
 {
     this.countryRepository        = countryRepository;
     this.congressVotingService    = congressVotingService;
     this.congressVotingRepository = congressVotingRepository;
     this.battleService            = battleService;
     this.battleRepository         = battleRepository;
     this.companyService           = companyService;
     this.walletService            = walletService;
     this.marketService            = marketService;
     this.equipmentService         = equipmentService;
     this.transactionScopeProvider = transactionScopeProvider;
     this.companyRepository        = companyRepository;
     this.equipmentRepository      = equipmentRepository;
     this.hotelRepository          = hotelRepository;
     this.mahService              = mahService;
     this.houseService            = houseService;
     this.houseRepository         = houseRepository;
     this.houseDayChangeProcessor = houseDayChangeProcessor;
 }
コード例 #3
0
 public CongressController(ICongressVotingRepository congressVotingRepository, ICongressVotingService congressVotingService, ICountryRepository countryRepository
                           , IRegionRepository regionRepository, ICongressCandidateVotingRepository congressCandidateVotingRepository,
                           ICongressCandidateService congressCandidateService, IPartyRepository partyRepository, IEntityRepository entityRepository
                           , IPopupService popupService, ICompanyRepository companyRepository) : base(popupService)
 {
     this.congressVotingRepository          = congressVotingRepository;
     this.congressVotingService             = congressVotingService;
     this.countryRepository                 = countryRepository;
     this.regionRepository                  = regionRepository;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.congressCandidateService          = congressCandidateService;
     this.partyRepository   = partyRepository;
     this.entityRepository  = entityRepository;
     this.companyRepository = companyRepository;
 }
コード例 #4
0
 public CountryService(ICountryRepository countriesRepository, IEntityRepository entititesRepository, IEntityService entityService,
                       IPresidentVotingRepository presidentVotingRepository, ICongressCandidateVotingRepository congressCandidateVotingRepository,
                       ICitizenRepository citizenRepository, ICitizenService citizenService, ICountryPresidentService countryPresidentService,
                       ICongressVotingService congressVotingService, IWalletService walletService, IWarningService warningService)
 {
     this.countryRepository                 = countriesRepository;
     this.entityRepository                  = entititesRepository;
     this.entityService                     = entityService;
     this.presidentVotingRepository         = presidentVotingRepository;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.citizenRepository                 = citizenRepository;
     this.citizenService                    = citizenService;
     this.countryPresidentService           = countryPresidentService;
     this.congressVotingService             = congressVotingService;
     this.walletService                     = walletService;
     this.warningService                    = warningService;
 }
コード例 #5
0
        static public ViewVotingBaseViewModel Instantiate(Entities.CongressVoting voting, ICongressVotingService congressVotingService)
        {
            bool isPlayerCongressman = false;
            bool canVote             = false;
            var  currentEntity       = SessionHelper.CurrentEntity;

            if (currentEntity.Citizen != null)
            {
                var citizen = currentEntity.Citizen;
                if (citizen?.Congressmen.Any(c => c.CountryID == voting.CountryID) == true)
                {
                    isPlayerCongressman = true;
                }

                canVote = congressVotingService.CanVote(citizen, voting);
            }

            return(instantiate(voting.GetVotingType(), voting, isPlayerCongressman, canVote));
        }