Example #1
0
 public CountryController(ICountryRepository countryRepository, ICountryService countryService, IPresidentVotingRepository presidentVotingRepository, IWarService warService,
                          ITransactionsService transactionService, IWarRepository warRepository, IRegionService regionService, IRegionRepository regionRepository, IEmbargoService embargoService,
                          IEmbargoRepository embargoRepository, IWalletRepository walletRepository, IPopupService popupService, ICountryTreasureService countryTreasureService,
                          IWalletService walletService, ICompanyService companyService, IMPPService mppService, IMilitaryProtectionPactRepository mppRepository,
                          IMilitaryProtectionPactOfferRepository mppOfferRepository, ITransactionScopeProvider transactionScopeProvider, IConstructionRepository constructionRepository,
                          IConstructionService constructionService) : base(popupService)
 {
     this.countryRepository         = countryRepository;
     this.countryService            = countryService;
     this.presidentVotingRepository = presidentVotingRepository;
     this.warService               = warService;
     this.transactionService       = transactionService;
     this.warRepository            = warRepository;
     this.regionService            = regionService;
     this.regionRepository         = regionRepository;
     this.embargoService           = embargoService;
     this.embargoRepository        = embargoRepository;
     this.walletRepository         = walletRepository;
     this.countryTreasureService   = countryTreasureService;
     this.walletService            = walletService;
     this.companyService           = companyService;
     this.mppService               = mppService;
     this.mppRepository            = mppRepository;
     this.mppOfferRepository       = mppOfferRepository;
     this.transactionScopeProvider = transactionScopeProvider;
     this.constructionRepository   = constructionRepository;
     this.constructionService      = constructionService;
 }
 private List <int> getEmbargoedCountriesIDs(Country buyerCountry, IEmbargoRepository embargoRepository)
 {
     return(embargoRepository.Where(e =>
                                    e.Active && e.EmbargoedCountryID == buyerCountry.ID)
            .Select(e => e.CreatorCountryID)
            .Distinct()
            .ToList());
 }
Example #3
0
 public EmbargoService(ICountryRepository countryRepository, IEmbargoRepository embargoRepository, IWarningService warningService, Entities.Repository.IWalletRepository walletRepository,
                       ITransactionsService transactionService)
 {
     this.countryRepository  = countryRepository;
     this.embargoRepository  = embargoRepository;
     this.warningService     = warningService;
     this.walletRepository   = walletRepository;
     this.transactionService = transactionService;
 }
        public TradeRegionSelector(Country buyerCountry, Country sellerCountry, IEmbargoRepository embargoRepository)
        {
            List <int> embargoedCountriesIDs = getEmbargoedCountriesIDs(buyerCountry, embargoRepository);

            embargoedCountriesIDs.AddRange(getEmbargoedCountriesIDs(sellerCountry, embargoRepository));

            NoCrossCountries = embargoedCountriesIDs
                               .Distinct()
                               .ToArray();
        }
Example #5
0
 public GiftService(IWalletService walletService, IEquipmentService equipmentService, IProductService productService, IRegionService regionService,
                    IEmbargoRepository embargoRepository, ITransactionsService transactionsService, IGiftTransactionRepository giftTransactionRepository,
                    IWarningService warningService, ICompanyFinanceSummaryService companyFinanceSummaryService)
 {
     this.walletService                = walletService;
     this.equipmentService             = equipmentService;
     this.productService               = productService;
     this.regionService                = regionService;
     this.embargoRepository            = embargoRepository;
     this.giftTransactionRepository    = giftTransactionRepository;
     this.transactionsService          = transactionsService;
     this.warningService               = warningService;
     this.companyFinanceSummaryService = companyFinanceSummaryService;
 }
Example #6
0
 public TradeService(IEquipmentRepository equipmentRepository, ITransactionsService transactionsService, IEquipmentService equipmentService, IWalletService walletService,
                     ITradeRepository tradeRepository, IProductService productService, IRegionService regionService, IEmbargoRepository embargoRepository, IWarningService warningService,
                     IWalletRepository walletRepository, ICompanyFinanceSummaryService companyFinanceSummaryService)
 {
     this.equipmentRepository          = Attach(equipmentRepository);
     this.transactionsService          = Attach(transactionsService);
     this.equipmentService             = Attach(equipmentService);
     this.walletService                = Attach(walletService);
     this.tradeRepository              = Attach(tradeRepository);
     this.productService               = Attach(productService);
     this.regionService                = Attach(regionService);
     this.embargoRepository            = Attach(embargoRepository);
     this.warningService               = Attach(warningService);
     this.walletRepository             = walletRepository;
     this.companyFinanceSummaryService = Attach(companyFinanceSummaryService);
 }
Example #7
0
 public MarketService(IEquipmentRepository equipmentRepository, IMarketOfferRepository marketOfferRepository, ICompanyRepository companyRepository,
                      IRegionService regionService, IEntityRepository entityRepository, ITransactionsService transactionService, IWalletService walletService,
                      IProductTaxRepository productTaxRepository, IProductService productService, IEmbargoRepository embargoRepository, ICountryRepository countryRepository,
                      IEquipmentService equipmentService, ICompanyFinanceSummaryService companyFinanceSummaryService)
 {
     this.equipmentRepository          = equipmentRepository;
     this.marketOfferRepository        = marketOfferRepository;
     this.companyRepository            = companyRepository;
     this.regionService                = regionService;
     this.entityRepository             = entityRepository;
     this.transactionService           = transactionService;
     this.walletService                = walletService;
     this.productTaxRepository         = productTaxRepository;
     this.productService               = productService;
     this.embargoRepository            = embargoRepository;
     this.countryRepository            = countryRepository;
     this.equipmentService             = equipmentService;
     this.companyFinanceSummaryService = companyFinanceSummaryService;
 }