コード例 #1
0
 public SiteInstallationService(ISiteRepository siteRepository,
                                IValidator <CreateSite> createSiteValidator,
                                ILanguageRepository languageRepository,
                                IValidator <CreateLanguage> createLanguageValidator,
                                ILanguageSortOrderGenerator languageSortOrderGenerator,
                                IPageRepository pageRepository,
                                IValidator <CreatePage> createPageValidator,
                                IValidator <ActivatePage> activatePageValidator,
                                IValidator <AddPageModule> addPageModuleValidator,
                                IModuleRepository moduleRepository,
                                IValidator <CreateModule> createModuleValidator,
                                IMenuRepository menuRepository,
                                IValidator <CreateMenu> createMenuValidator,
                                IValidator <AddMenuItem> addMenuItemValidator,
                                IModuleTypeRepository moduleTypeRepository)
 {
     _siteRepository             = siteRepository;
     _createSiteValidator        = createSiteValidator;
     _languageRepository         = languageRepository;
     _createLanguageValidator    = createLanguageValidator;
     _languageSortOrderGenerator = languageSortOrderGenerator;
     _pageRepository             = pageRepository;
     _createPageValidator        = createPageValidator;
     _activatePageValidator      = activatePageValidator;
     _addPageModuleValidator     = addPageModuleValidator;
     _moduleRepository           = moduleRepository;
     _createModuleValidator      = createModuleValidator;
     _menuRepository             = menuRepository;
     _createMenuValidator        = createMenuValidator;
     _addMenuItemValidator       = addMenuItemValidator;
     _moduleTypeRepository       = moduleTypeRepository;
 }
コード例 #2
0
ファイル: Language.cs プロジェクト: zdlian/Weapsy
        public static Language CreateNew(CreateLanguage cmd,
                                         IValidator <CreateLanguage> validator,
                                         ILanguageSortOrderGenerator sortOrderGenerator)
        {
            validator.ValidateCommand(cmd);

            return(new Language(cmd, sortOrderGenerator));
        }
コード例 #3
0
 public CreateLanguageHandler(ILanguageRepository languageRepository,
                              IValidator <CreateLanguage> validator,
                              ILanguageSortOrderGenerator sortOrderGenerator)
 {
     _languageRepository = languageRepository;
     _validator          = validator;
     _sortOrderGenerator = sortOrderGenerator;
 }
コード例 #4
0
ファイル: Language.cs プロジェクト: zzekikaya/Weapsy
 private Language(CreateLanguage cmd, ILanguageSortOrderGenerator languageSortOrderGenerator)
     : base(cmd.Id)
 {
     AddEvent(new LanguageCreated
     {
         SiteId          = cmd.SiteId,
         AggregateRootId = Id,
         Name            = cmd.Name,
         CultureName     = cmd.CultureName,
         Url             = cmd.Url,
         SortOrder       = languageSortOrderGenerator.GenerateNextSortOrder(cmd.SiteId),
         Status          = LanguageStatus.Hidden
     });
 }
コード例 #5
0
 public SiteInstallationService(ISiteRepository siteRepository,
                                IValidator <CreateSite> createSiteValidator,
                                IValidator <UpdateSiteDetails> updateSiteDetailsValidator,
                                ILanguageRepository languageRepository,
                                IValidator <CreateLanguage> createLanguageValidator,
                                IValidator <ActivateLanguage> activateLanguageValidator,
                                ILanguageSortOrderGenerator languageSortOrderGenerator,
                                IPageRepository pageRepository,
                                IValidator <CreatePage> createPageValidator,
                                IValidator <ActivatePage> activatePageValidator,
                                IValidator <AddPageModule> addPageModuleValidator,
                                IModuleRepository moduleRepository,
                                IValidator <CreateModule> createModuleValidator,
                                IMenuRepository menuRepository,
                                IValidator <CreateMenu> createMenuValidator,
                                IValidator <AddMenuItem> addMenuItemValidator,
                                IModuleTypeRepository moduleTypeRepository,
                                ICommandSender commandSender,
                                IQueryDispatcher queryDispatcher)
 {
     _siteRepository             = siteRepository;
     _createSiteValidator        = createSiteValidator;
     _updateSiteDetailsValidator = updateSiteDetailsValidator;
     _languageRepository         = languageRepository;
     _createLanguageValidator    = createLanguageValidator;
     _activateLanguageValidator  = activateLanguageValidator;
     _languageSortOrderGenerator = languageSortOrderGenerator;
     _pageRepository             = pageRepository;
     _createPageValidator        = createPageValidator;
     _activatePageValidator      = activatePageValidator;
     _addPageModuleValidator     = addPageModuleValidator;
     _moduleRepository           = moduleRepository;
     _createModuleValidator      = createModuleValidator;
     _menuRepository             = menuRepository;
     _createMenuValidator        = createMenuValidator;
     _addMenuItemValidator       = addMenuItemValidator;
     _moduleTypeRepository       = moduleTypeRepository;
     _commandSender   = commandSender;
     _queryDispatcher = queryDispatcher;
 }