Beispiel #1
0
        public KeywordManager(KeywordChangeNotifier keywordChangeNotifier, PageChangeNotifier pageChangeNotifier,
                              BeforeKeywordChangeNotifier beforeKeywordChangeNotifier, ILog log)
        {
            _log = log;
            _keywordChangeNotifierUnsubscriber       = keywordChangeNotifier.Subscribe(this);
            _pageChangeNotifierUnsubscriber          = pageChangeNotifier.Subscribe(this);
            _beforeKeywordChangeNotifierUnsubscriber = beforeKeywordChangeNotifier.Subscribe(this);

            // NOTE: should be executed once at startup to fixed already installed packages
            FixMissingHomePages();
        }
        public static void OnInitialized(KeywordChangeNotifier keywordChangeNotifier)
        {
            DynamicTypeManager.EnsureCreateStore(typeof(RedirectKeyword));

            DataEvents <RedirectKeyword> .OnAfterAdd    += keywordChangeNotifier.KeywordChange;
            DataEvents <RedirectKeyword> .OnAfterUpdate += keywordChangeNotifier.KeywordChange;
            DataEvents <RedirectKeyword> .OnDeleted     += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnAfterAdd    += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnAfterUpdate += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnDeleted     += keywordChangeNotifier.KeywordChange;

            var functions = MvcFunctionRegistry.NewFunctionCollection();

            RegisterFunctions(functions);
            RegisterFunctionRoutes(functions);

            UrlToEntityTokenFacade.Register(new KeywordsUrlToEntityTokenMapper());
        }
Beispiel #3
0
 public KeywordManager(KeywordChangeNotifier changeNotifier, ILog log)
 {
     _log = log;
     _notifierUnsubscriber = changeNotifier.Subscribe(this);
 }