Example #1
0
 public CompanyService(ICitizenService citizenService, IConfigurationRepository configurationRepository,
                       IEquipmentRepository equipmentRepository, IProductService productService, IProductRepository productRepository,
                       ICitizenRepository citizenRepository, ITransactionsService transactionService,
                       IJobOfferService jobOfferService, ICompanyEmployeeRepository companyEmployeeRepository,
                       ICompanyRepository companyRepository, IEntityService entityService, ICompanyManagerRepository companyManagerRepository,
                       IRegionRepository regionRepository, IWarningService warningService, IJobOfferRepository jobOfferRepository,
                       IEquipmentService equipmentService, IContractService contractService, IWalletService walletService, IPopupService popupService,
                       IRegionService regionService, ICompanyFinanceSummaryService companyFinanceSummaryService)
 {
     this.companyRepository         = companyRepository;
     this.entityService             = entityService;
     this.companyManagerRepository  = companyManagerRepository;
     this.jobOfferService           = jobOfferService;
     this.companyEmployeeRepository = companyEmployeeRepository;
     this.citizenRepository         = citizenRepository;
     this.transactionService        = transactionService;
     this.equipmentRepository       = equipmentRepository;
     this.productService            = productService;
     this.productRepository         = productRepository;
     this.citizenService            = Attach(citizenService);
     this.configurationRepository   = configurationRepository;
     this.regionRepository          = regionRepository;
     this.warningService            = Attach(warningService);
     this.jobOfferRepository        = jobOfferRepository;
     this.equipmentService          = Attach(equipmentService);
     this.contractService           = Attach(contractService);
     this.walletService             = Attach(walletService);
     this.popupService  = Attach(popupService);
     this.regionService = Attach(regionService);
     this.companyFinanceSummaryService = Attach(companyFinanceSummaryService);
 }
Example #2
0
        public FilmListViewModel(IMediator mediator,
                                 IWarningService warningService,
                                 FilmFacade facade)
        {
            usedMediator       = mediator;
            usedWarningService = warningService;
            usedFacade         = facade;

            mediator.Register <YES_WarningResultMessage <FilmWrappedModel> >(DeleteFilm);
            mediator.Register <NO_WarningResultMessage <FilmWrappedModel> >(UpdateFilms);
            mediator.Register <UpdateMessage <FilmWrappedModel> >(UpdateFilms);

            FilmSelectedCommand  = new RelayCommand <FilmListModel>(SendFilmSelectedMessage);
            AddButtonCommand     = new RelayCommand(SendFilmNewMessage);
            DeleteButtonCommand  = new RelayCommand(ExecuteWarning, IsEnabled_DeleteButton);
            DetailButtonCommand  = new RelayCommand(SendDetailButtonPushedMessage, IsEnabled_DetailButton);
            RefreshButtonCommand = new RelayCommand(Refresh);
            SearchButtonCommand  = new RelayCommand(StartSearching);

            SearchedObject   = defaultSearchingBoxMessage;
            SearchingOptions = new List <string>()
            {
                "Origninal name", "Czech name", "Country of origin", "Description"
            };
            SelectedOption = SearchingOptions[0];

            Load();
        }
Example #3
0
 public DevIssueService(IDevIssueRepository devIssueRepository, IDevIssueCommentRepository devIssueCommentRepository,
                        IWarningService warningService)
 {
     this.devIssueRepository        = devIssueRepository;
     this.devIssueCommentRepository = devIssueCommentRepository;
     this.warningService            = warningService;
 }
Example #4
0
 public RegionService(IRegionRepository regionRepository, ICountryRepository countryRepository, IWarningService warningService, ITransactionsService transactionService)
 {
     this.regionRepository   = regionRepository;
     this.countryRepository  = countryRepository;
     this.warningService     = warningService;
     this.transactionService = transactionService;
 }
Example #5
0
 public RemovalService(IEntityRepository entityRepository, ITradeService tradeService, ICompanyEmployeeRepository companyEmployeeRepository, IWarningService warningService)
 {
     this.entityRepository          = entityRepository;
     this.tradeService              = tradeService;
     this.companyEmployeeRepository = companyEmployeeRepository;
     this.warningService            = warningService;
 }
Example #6
0
        public ActorListViewModel(IMediator mediator,
                                  IWarningService warningService,
                                  ActorFacade facade)
        {
            usedMediator       = mediator;
            usedWarningService = warningService;
            usedFacade         = facade;

            mediator.Register <YES_WarningResultMessage <ActorWrappedModel> >(DeleteActor);
            mediator.Register <NO_WarningResultMessage <ActorWrappedModel> >(UpdateActors);
            mediator.Register <UpdateMessage <ActorWrappedModel> >(UpdateActors);

            ActorSelectedCommand = new RelayCommand <ActorListModel>(SendActorSelectedMessage);
            AddButtonCommand     = new RelayCommand(SendActorNewMessage);
            DeleteButtonCommand  = new RelayCommand(ExecuteWarning, IsEnabled_DeleteDetailButton);
            DetailButtonCommand  = new RelayCommand(SendDetailButtonPushedMessage, IsEnabled_DeleteDetailButton);
            RefreshButtonCommand = new RelayCommand(Refresh);
            SearchButtonCommand  = new RelayCommand(StartSearching);

            SearchedObject   = defaultSearchingBoxMessage;
            SearchingOptions = new List <string>()
            {
                "First name", "Second name"
            };
            SelectedOption = SearchingOptions[1];

            Load();
        }
        public CongressVotingService(ICongressVotingRepository congressVotingRepository, IPartyMemberRepository partyMemberRepository, ICongressmenRepository congressmenRepository,
                                     IProductTaxRepository productTaxRepository, IWarningService warningService, ICompanyService companyService, IWalletService walletService, IRegionRepository regionRepository,
                                     IReservedEntityNameRepository reservedEntityNameRepository, ICongressVotingReservedMoneyRepository congressVotingReservedMoneyRepository, ITransactionsService transactionsService,
                                     ICompanyRepository companyRepository, ICitizenRepository citizenRepository, IVotingGreetingMessageRepository votingGreetingMessageRepository,
                                     IHospitalService hospitalService, ICountryRepository countryRepository, IRemovalService removalService,
                                     IDefenseSystemService defenseSystemService, IConstructionService constructionService, ICountryEventService countryEventService)

        {
            this.congressVotingRepository              = congressVotingRepository;
            this.partyMemberRepository                 = partyMemberRepository;
            this.congressmenRepository                 = congressmenRepository;
            this.productTaxRepository                  = productTaxRepository;
            this.warningService                        = warningService;
            this.companyService                        = companyService;
            this.walletService                         = walletService;
            this.regionRepository                      = regionRepository;
            this.reservedEntityNameRepository          = reservedEntityNameRepository;
            this.congressVotingReservedMoneyRepository = congressVotingReservedMoneyRepository;
            this.transactionsService                   = transactionsService;
            this.companyRepository                     = companyRepository;
            this.citizenRepository                     = citizenRepository;
            this.votingGreetingMessageRepository       = votingGreetingMessageRepository;
            this.hospitalService                       = hospitalService;
            this.countryRepository                     = countryRepository;
            this.removalService                        = removalService;
            this.constructionService                   = constructionService;
            this.defenseSystemService                  = defenseSystemService;
            this.countryEventService                   = countryEventService;
        }
Example #8
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;
 }
Example #9
0
 public MPPService(ICountryService countryService, IWalletService walletService, IWarService warService,
                   IMilitaryProtectionPactOfferRepository militaryProtectionPactOfferRepository, ITransactionsService transactionsService,
                   IWarningService warningService, IMilitaryProtectionPactRepository militaryProtectionPactRepository)
 {
     this.countryService = countryService;
     this.walletService  = walletService;
     this.warService     = warService;
     this.militaryProtectionPactOfferRepository = militaryProtectionPactOfferRepository;
     this.transactionsService = transactionsService;
     this.warningService      = warningService;
     this.militaryProtectionPactRepository = militaryProtectionPactRepository;
 }
Example #10
0
        public WarningController(IWarningService warningService)
        {
            _warningService = warningService;
            Warning warning = new Warning {
                WarningDate = DateTime.UtcNow.AddDays(2)
            };
            var warn = _warningService.GetWarningSetting();

            if (warn == null)
            {
                _warningService.SetDefaultWarning(warning);
            }
        }
Example #11
0
 public PartyService(IPartyRepository partyRepository, IEntityService entityService, ICitizenRepository citizenRepository,
                     ICongressCandidateVotingRepository congressCandidateVotingRepository, IPartyInviteRepository partyInviteRepository,
                     IPartyJoinRequestRepository partyJoinRequestRepository, IWarningService warningService, IPopupService popupService)
 {
     this.partyRepository   = partyRepository;
     this.entityService     = entityService;
     this.citizenRepository = citizenRepository;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.partyInviteRepository             = partyInviteRepository;
     this.partyJoinRequestRepository        = partyJoinRequestRepository;
     this.warningService = Attach(warningService);
     this.popupService   = popupService;
 }
Example #12
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;
 }
        public ViolationService(IMessageService messageService, IPunishmentService punishmentService,
                                IWarningService warningService, IUserWarningsService userWarningService,
                                IModerationModuleUtils moderationModuleUtils)
        {
            _messageService = messageService;

            _punishmentService = punishmentService;

            _warningService = warningService;

            _userWarningService = userWarningService;

            _moderationModuleUtils = moderationModuleUtils;
        }
 public ConstructionService(IDefenseSystemService defenseSystemService, IConstructionRepository constructionRepository, ICompanyService companyService,
                            IHospitalService hospitalService, IReservedEntityNameRepository reservedEntityNameRepository, IRemovalService removalService, IWalletService walletService, IWarningService warningService,
                            IWalletRepository walletRepository)
 {
     this.defenseSystemService         = defenseSystemService;
     this.constructionRepository       = constructionRepository;
     this.companyService               = companyService;
     this.hospitalService              = hospitalService;
     this.reservedEntityNameRepository = reservedEntityNameRepository;
     this.removalService               = removalService;
     this.walletService    = walletService;
     this.warningService   = warningService;
     this.walletRepository = walletRepository;
 }
Example #15
0
        private PM25Status CalcStatus(double pm25)
        {
            IWarningService limitService = IOCService.Instance.QueryService("WARN_SERVICE") as IWarningService;
            double          limit        = limitService.WarningLimit;

            if (pm25 > limit)
            {
                return(PM25Status.WARNING);
            }
            else
            {
                return(PM25Status.NORMAL);
            }
        }
Example #16
0
 public NewspaperService(INewspaperRepository newspaperRepository, IEntityService entityService, IEntityRepository entityRepository, IArticleRepository articleRepository,
                         IUploadService uploadService, IWarningService warningService, ITransactionsService transactionService, IWalletService walletService, IConfigurationRepository configurationRepository,
                         ICitizenService citizenService)
 {
     this.newspaperRepository     = newspaperRepository;
     this.entityService           = Attach(entityService);
     this.entityRepository        = entityRepository;
     this.articleRepository       = articleRepository;
     this.uploadService           = Attach(uploadService);
     this.warningService          = Attach(warningService);
     this.transactionService      = Attach(transactionService);
     this.walletService           = walletService;
     this.configurationRepository = configurationRepository;
     this.citizenService          = Attach(citizenService);
 }
Example #17
0
 public CitizenService(ICountryRepository countriesRepository, Entities.Repository.IWalletRepository walletsRepository, ICitizenRepository citizensRepository,
                       IEntityService entitiesService, IConfigurationRepository configurationRepository, ITransactionsService transactionService, IWarningService warningService,
                       IPopupService popupService, IWalletService walletService, IMessageService messageService, IEquipmentService equipmentService)
 {
     this.countriesRepository     = countriesRepository;
     this.walletsRepository       = walletsRepository;
     this.entitiesService         = entitiesService;
     this.configurationRepository = configurationRepository;
     this.citizenRepository       = citizensRepository;
     this.transactionService      = Attach(transactionService);
     this.warningService          = Attach(warningService);
     this.popupService            = Attach(popupService);
     this.walletService           = walletService;
     this.messageService          = messageService;
     this.equipmentService        = equipmentService;
 }
Example #18
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 #19
0
 public WarService(IWarRepository warRepository, Entities.Repository.IWalletRepository walletRepository, ICountryRepository countryRepository, ITransactionsService transactionService,
                   IWarningService warningService, ICitizenRepository citizenRepository, ICitizenService citizenService, IPopupService popupService, IWalletService walletService,
                   IBattleRepository battleRepository, IWarEventService warEventService)
 {
     this.warRepository      = warRepository;
     this.walletRepository   = walletRepository;
     this.countryRepository  = countryRepository;
     this.transactionService = Attach(transactionService);
     this.warningService     = Attach(warningService);
     this.citizenRepository  = citizenRepository;
     this.citizenService     = citizenService;
     this.popupService       = Attach(popupService);
     this.walletService      = Attach(walletService);
     this.battleRepository   = battleRepository;
     this.warEventService    = warEventService;
 }
        public ModerationController(IModuleSettingsService <ModerationSettings> moderationSettings,
                                    IEntityService <ProfanityFilter> entityServiceProfanityFilter,
                                    IEntityService <LinkFilter> entityServiceLinkFilter,
                                    IEntityService <WhitelistedChannel> entityServiceWhitelistedChannels,
                                    IEntityService <WhitelistedRole> entityServiceWhitelistedRoles,
                                    IEntityService <WhitelistedLink> entityServiceWhitelistedLinks,
                                    IEntityService <BannedWord> entityServiceBannedWords,
                                    IEntityService <Punishment> entityServicePunishments,
                                    IEntityService <Warning> entityServiceWarnings,
                                    IEntityService <ActivePunishment> entityServiceActivePunishments,
                                    IEntityService <UserWarnings> entityServiceUsers,
                                    IDiscordUserService discordUserService,
                                    IPunishmentService punishmentService,
                                    IWarningService warningService,
                                    IModerationModuleUtils moderationModuleUtils
                                    )
        {
            _moderationSettings = moderationSettings;

            _entityServiceProfanityFilter = entityServiceProfanityFilter;

            _entityServiceLinkFilter = entityServiceLinkFilter;

            _entityServiceWhitelistedChannels = entityServiceWhitelistedChannels;

            _entityServiceWhitelistedRoles = entityServiceWhitelistedRoles;

            _entityServiceWhitelistedLinks = entityServiceWhitelistedLinks;

            _entityServiceBannedWords = entityServiceBannedWords;

            _entityServicePunishments = entityServicePunishments;

            _entityServiceWarnings = entityServiceWarnings;

            _entityServiceActivePunishments = entityServiceActivePunishments;

            _entityServiceUsers = entityServiceUsers;

            _discordUserService = discordUserService;

            _punishmentService = punishmentService;

            _warningService = warningService;

            _moderationModuleUtils = moderationModuleUtils;
        }
Example #21
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;
 }
Example #22
0
 public PartyController(IPartyRepository partyRepository, IPartyService partyService, ITransactionsService transactionService,
                        IUploadService uploadService, ICongressCandidateVotingRepository congressCandidateVotingRepository, IWarningService warningService,
                        ICountryRepository countryRepository, IEntityService entityService, ICongressCandidateService congressCandidateService
                        , IPopupService popupService, ICitizenRepository citizenRepository, IPartyInviteRepository partyInviteRepository,
                        IPartyJoinRequestRepository partyJoinRequestRepository) : base(popupService)
 {
     this.partyRepository    = partyRepository;
     this.partyService       = partyService;
     this.transactionService = transactionService;
     this.uploadService      = uploadService;
     this.congressCandidateVotingRepository = congressCandidateVotingRepository;
     this.warningService             = warningService;
     this.countryRepository          = countryRepository;
     this.entityService              = entityService;
     this.congressCandidateService   = congressCandidateService;
     this.citizenRepository          = citizenRepository;
     this.partyInviteRepository      = partyInviteRepository;
     this.partyJoinRequestRepository = partyJoinRequestRepository;
 }
Example #23
0
 public BattleService(IBattleRepository battleRepository, IRegionRepository regionRepository, IWarService warService, IEquipmentRepository equipmentRepository,
                      IWarningService warningService, ICountryRepository countryRepository, ITransactionsService transactionService, IRegionService regionService,
                      IWarRepository warRepository, ICitizenRepository citizenRepository, ICitizenService citizenService, IEntityRepository entityRepository,
                      IBattleEventService battleEventService)
 {
     this.battleRepository    = battleRepository;
     this.regionRepository    = regionRepository;
     this.warService          = Attach(warService);
     this.equipmentRepository = equipmentRepository;
     this.warningService      = Attach(warningService);
     this.countryRepository   = countryRepository;
     this.transactionService  = Attach(transactionService);
     this.regionService       = Attach(regionService);
     this.warRepository       = warRepository;
     this.citizenRepository   = citizenRepository;
     this.citizenService      = citizenService;
     this.entityRepository    = entityRepository;
     this.battleEventService  = battleEventService;
 }
Example #24
0
        public static void SendWarnings(IWarningService warningService)
        {
            IEnumerable <Warning> warnList = warningService.GetWarning().ToList();
            var warning = from warn in warnList
                          select new
            {
                GoodsId        = warn.GoodsId,
                GoodName       = warn.Goods.Name,
                MinStorage     = warn.Goods.minNum,
                CurrentStorage = warn.Goods.GoodsStorages.Sum(g => g.Quantity)
            };
            string warningMessage = JsonConvert.SerializeObject(warning);
            var    buffer         = new ArraySegment <byte>(Encoding.UTF8.GetBytes(warningMessage));

            foreach (WebSocket socket in CONNECT_POOL.Values)
            {
                if (socket.State == WebSocketState.Open)
                {
                    socket.SendAsync(buffer, WebSocketMessageType.Text, true, CancellationToken.None);
                }
            }
        }
Example #25
0
 public WarningController(IWarningService warningService)
 {
     _warningService = warningService;
 }
Example #26
0
 public ShipmentController(IWareHouseService wareHouseService, IShipmentService shipmentService, IWarningService warningService)
 {
     this.wareHouseService = wareHouseService;
     this.shipmentService  = shipmentService;
     this.warningService   = warningService;
 }
Example #27
0
 public FriendService(IFriendRepository friendRepository, IWarningService warningService, IPopupService popupService)
 {
     this.friendRepository = friendRepository;
     this.warningService   = Attach(warningService);
     this.popupService     = Attach(popupService);
 }
 public WarningCommands(IWarningService warningService, ILogger <WarningCommands> logger)
 {
     _warningService = warningService;
     _logger         = logger;
 }
Example #29
0
 public ContractService(IContractRepository contractRepository, ICompanyEmployeeRepository companyEmployeeRepository, IWarningService warningService)
 {
     this.contractRepository        = contractRepository;
     this.companyEmployeeRepository = companyEmployeeRepository;
     this.warningService            = Attach(warningService);
 }
Example #30
0
 public StorageController(IWareHousingListService wareHousingListService, IWarningService warningService)
 {
     this.wareHousingListService = wareHousingListService;
     this.warningService         = warningService;
 }