Beispiel #1
0
 public Engine(
     IAccountService accountService,
     IGovernmentService governmentService,
     IGroupService groupService,
     IReportService reportService,
     IPlotService plotService,
     IDecisionService decisionService,
     IAudienceService audienceService,
     INewsService newsService,
     IRevolutionService revolutionService,
     IScoreService scoreService,
     IEscapeService escapeService,
     IAssassinationService assassinationService,
     ILoanService loanService,
     IWarService warService)
 {
     this.accountService       = accountService;
     this.governmentService    = governmentService;
     this.groupService         = groupService;
     this.reportService        = reportService;
     this.plotService          = plotService;
     this.decisionService      = decisionService;
     this.audienceService      = audienceService;
     this.newsService          = newsService;
     this.revolutionService    = revolutionService;
     this.scoreService         = scoreService;
     this.escapeService        = escapeService;
     this.assassinationService = assassinationService;
     this.loanService          = loanService;
     this.warService           = warService;
 }
Beispiel #2
0
 public CombatCommands(IUserRepository userRepository, ICombatService combatService, IGovernmentService governmentService, IMonsterMenuService monsterMenuService)
 {
     _userRepository     = userRepository;
     _combatService      = combatService;
     _governmentService  = governmentService;
     _monsterMenuService = monsterMenuService;
 }
Beispiel #3
0
 public AccountController(
     IAuthenticationService authenticationService,
     IWechatLoginEventService wechatLoginEventService,
     IAccountUserService customerService,
     IAccountUserRegistrationService customerRegistrationService,
     IGenericAttributeService genericAttributeService,
     IWorkflowMessageService workflowMessageService,
     IAccountUserActivityService accountUserActivityService,
     IGovernmentService governmentService,
     IWebHelper webHelper,
     IWorkContext workContext, IEncryptionService encryptionService,
     AccountUserSettings customerSettings)
 {
     _authenticationService          = authenticationService;
     _wechatLoginEventService        = wechatLoginEventService;
     _accountService                 = customerService;
     _accountUserRegistrationService = customerRegistrationService;
     _genericAttributeService        = genericAttributeService;
     _workflowMessageService         = workflowMessageService;
     _accountUserActivityService     = accountUserActivityService;
     _governmentService              = governmentService;
     _encryptionService              = encryptionService;
     _webHelper           = webHelper;
     _workContext         = workContext;
     _accountUserSettings = customerSettings;
 }
Beispiel #4
0
 public ShopService(IUserRepository userRepository, IInventoryRepository inventoryRepository, IItemFactory itemFactory, IGovernmentService governmentService)
 {
     _userRepository      = userRepository;
     _inventoryRepository = inventoryRepository;
     _itemFactory         = itemFactory;
     _governmentService   = governmentService;
 }
Beispiel #5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="AccountService"/> class from a <see cref="IAccount"/>,
 ///     a <see cref="IGroupService"/> and a <see cref="IGovernmentService"/> components.
 /// </summary>
 /// <param name="account">The component used to provide information related to the accounts and costs.</param>
 /// <param name="groupService">The service used to provide functionality related to the groups or factions.</param>
 /// <param name="governmentService">The service used to provide functionality related to the government settings and operations.</param>
 public AccountService(IAccount account, IGroupService groupService, IGovernmentService governmentService)
 {
     this.account           = account;
     this.groupService      = groupService;
     this.governmentService = governmentService;
     Initialise();
 }
Beispiel #6
0
 public ShopService(IInventoryRepository inventoryRepository, IItemRepository itemRepository, IGovernmentService governmentService, ICreditsRepository creditsRepository)
 {
     _inventoryRepository = inventoryRepository;
     _itemRepository      = itemRepository;
     _governmentService   = governmentService;
     _creditsRepository   = creditsRepository;
 }
Beispiel #7
0
 public EventService(ICoffeeService coffeeBreakService, ISlursCommands slurs, IGovernmentRepository governmentRepository, IGovernmentService governmentService)
 {
     _coffeeBreakService = coffeeBreakService;
     _slurs = slurs;
     _governmentRepository = governmentRepository;
     _governmentService    = governmentService;
 }
Beispiel #8
0
 public ShopMenuService(IUserRepository userRepository, ISlackWebApi slack, IItemRepository itemRepository, IShopService shopService, IGovernmentService governmentService, IShopRepository shopRepository)
 {
     _userRepository    = userRepository;
     _slack             = slack;
     _itemRepository    = itemRepository;
     _shopService       = shopService;
     _governmentService = governmentService;
     _shopRepository    = shopRepository;
 }
        public GovernmentUnitValidator(IGovernmentService governmentService, CommonSettings commonSettings, MediaSettings mediaSettings)
        {
            _governmentService = governmentService;
            _commonSettings    = commonSettings;
            _mediaSettings     = mediaSettings;

            RuleFor(s => s.Name).NotEmpty().WithMessage("单位名称不能为空").Must(BeUniqueName).WithMessage("名称 {0} 已存在", s => s.Name);
            RuleFor(s => s.Person).NotEmpty().WithMessage("联系人不能为空");
            RuleFor(s => s.Tel).NotEmpty().WithMessage("联系方式不能为空").Matches(commonSettings.TelAndMobliePartten).WithMessage("联系方式不是正确的电话号码格式");
        }
Beispiel #10
0
 public ImportManager(IPropertyService propertyService, IGovernmentService governmentService, IAccountUserService accountUserServic,
                      IWorkContext workContext, IPictureService pictureService, IFileService fileService, IPropertyNewCreateService propertyNewCreateService)
 {
     _propertyService          = propertyService;
     _governmentService        = governmentService;
     _accountUserService       = accountUserServic;
     _workContext              = workContext;
     _pictureService           = pictureService;
     _fileService              = fileService;
     _propertyNewCreateService = propertyNewCreateService;
 }
Beispiel #11
0
        public AccountUserValidator(IAccountUserService accountUserService, IGovernmentService governmentService)
        {
            _accountUserService = accountUserService;
            _governmentService  = governmentService;

            RuleFor(s => s.UserName).NotEmpty().WithMessage("用户名不能为空").Must(BeUniqueName).WithMessage("名称 {0} 已存在", s => s.UserName);

            RuleFor(s => s.GovernmentId).Must(governmentId =>
            {
                var accountUserGovernment = governmentService.GetGovernmentUnitById(governmentId);
                return(accountUserGovernment != null && !accountUserGovernment.Deleted);
            }).WithMessage(string.Format("单位不存在"));
        }
        public GovernmentUnitController(
            IAccountUserService accountUserService,
            IGovernmentService governmentService,
            IAccountUserActivityService accountUserActivityService,
            IWebHelper webHelper,
            IWorkContext workContext)

        {
            _accountUserService         = accountUserService;
            _accountUserActivityService = accountUserActivityService;
            _governmentService          = governmentService;

            _webHelper   = webHelper;
            _workContext = workContext;
        }
        public StatisticsController(
            IPropertyService propertyService,
            IAccountUserService accountUserService,
            IGovernmentService governmentService,
            IAccountUserActivityService accountUserActivityService,
            IWebHelper webHelper,
            IWorkContext workContext)
        {
            _propertyService            = propertyService;
            _accountUserService         = accountUserService;
            _accountUserActivityService = accountUserActivityService;
            _governmentService          = governmentService;

            _webHelper   = webHelper;
            _workContext = workContext;
        }
Beispiel #14
0
        public ShopMenu(Shop shop, User user, IItemFactory itemFactory, IGovernmentService governmentService)
        {
            var items = shop.ShopItems.Select(itm => itemFactory.CreateItem(itm.ItemId));

            _governmentService = governmentService;
            Blocks             = new List <Block>
            {
                ShopHeader(),
                new Section(new MarkdownText($"*{shop.Name}* \n {shop.Description}")),
                new Divider()
            };

            Blocks.AddRange(items.Aggregate(new List <Block>(), (list, item) => list.Concat(ShopItemSection(item, shop.Id)).ToList()));
            Blocks.Add(new Divider());

            Blocks.Add(new Context(new List <string> {
                string.Format(DougMessages.Balance, user.Credits)
            }));
        }
Beispiel #15
0
        public DemoController(IAuthenticationService authenticationService, IAccountUserService customerService,
                              IAccountUserRegistrationService customerRegistrationService,
                              IGenericAttributeService genericAttributeService,
                              IWorkflowMessageService workflowMessageService, IGovernmentService governmentService, IPropertyService propertyService,
                              IPropertyAllotService propertyAllotService, IPropertyLendService propertyLendService, IPropertyNewCreateService propertyNewCreateService,
                              IPropertyOffService propertyOffService, IPropertyRentService propertyRentService, IEncryptionService encryptionService, IPictureService pictureService,
                              IPropertyEditService propertyEditService, ICopyPropertyService copyPropertyService,
                              IWebHelper webHelper,
                              IWorkContext workContext,
                              AccountUserSettings customerSettings, CommonSettings commonSettings, SecuritySettings securitySettings, ISettingService settingService
                              )
        {
            _authenticationService          = authenticationService;
            _accountUserService             = customerService;
            _accountUserRegistrationService = customerRegistrationService;
            _genericAttributeService        = genericAttributeService;
            _workflowMessageService         = workflowMessageService;
            _governmentService        = governmentService;
            _propertyService          = propertyService;
            _propertyAllotService     = propertyAllotService;
            _propertyLendService      = propertyLendService;
            _propertyNewCreateService = propertyNewCreateService;
            _propertyEditService      = propertyEditService;
            _propertyOffService       = propertyOffService;
            _propertyRentService      = propertyRentService;
            _copyPropertyService      = copyPropertyService;
            _encryptionService        = encryptionService;
            _pictureService           = pictureService;

            _webHelper           = webHelper;
            _workContext         = workContext;
            _accountUserSettings = customerSettings;

            _commonSettings   = commonSettings;
            _securitySettings = securitySettings;
            _settingService   = settingService;
        }
Beispiel #16
0
 public GovernmentController(IGovernmentService governmentService)
 {
     _governmentService = governmentService;
 }
Beispiel #17
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ReportService"/> class from a <see cref="IAccountService"/>,
 ///     a <see cref="IGroupService"/> and a <see cref="IGovernmentService"/> components.
 /// </summary>
 /// <param name="accountService">The service used to provide functionality related to the treasury and associated costs and
 /// the Swiss bank account.</param>
 /// <param name="groupService">The service used to provide functionality related to the groups or factions.</param>
 /// <param name="governmentService">The service used to provide functionality related to the government settings and operations.</param>
 public ReportService(IAccountService accountService, IGroupService groupService, IGovernmentService governmentService)
 {
     this.accountService    = accountService;
     this.groupService      = groupService;
     this.governmentService = governmentService;
 }
Beispiel #18
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="AssassinationService"/> class from a <see cref="IGroupService"/> and
 ///     a <see cref="IGovernmentService"/> components.
 /// </summary>
 /// <param name="groupService">The service used to provide functionality related to the groups or factions.</param>
 /// <param name="governmentService">The service used to provide functionality related to the government settings and operations.</param>
 public AssassinationService(IGroupService groupService, IGovernmentService governmentService)
 {
     this.groupService      = groupService;
     this.governmentService = governmentService;
 }
Beispiel #19
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="PlotService"/> class from a <see cref="IGroupService"/> and
 ///     a <see cref="IGovernmentService"/> components.
 /// </summary>
 /// <param name="groupService">The service used to provide functionality related to the groups or factions.</param>
 /// <param name="governmentService">The service used to provide functionality related to the government settings and operations.</param>
 public PlotService(IGroupService groupService, IGovernmentService governmentService)
 {
     this.groupService      = groupService;
     this.governmentService = governmentService;
 }
Beispiel #20
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RevolutionService"/> class from a <see cref="IRevolution"/>,
 ///     a <see cref="IGroupService"/> and a <see cref="IGovernmentService"/> components.
 /// </summary>
 /// <param name="revolution">The component used to setup a revolution which sets the player and a possible ally against other groups.</param>
 /// <param name="groupService">The service used to provide functionality related to the groups or factions.</param>
 /// <param name="governmentService">The service used to provide functionality related to the government settings and operations.</param>
 public RevolutionService(IRevolution revolution, IGroupService groupService, IGovernmentService governmentService)
 {
     this.revolution        = revolution;
     this.groupService      = groupService;
     this.governmentService = governmentService;
 }
Beispiel #21
0
 public GovernmentController(IGovernmentService governmentService) : base(governmentService)
 {
     this.governmentService = governmentService;
 }