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, PageChangeNotifier pageChangeNotifier, BeforeKeywordChangeNotifier beforeKeywordChangeNotifier) { DynamicTypeManager.EnsureCreateStore(typeof(RedirectKeyword)); DataEvents <RedirectKeyword> .OnAfterAdd += keywordChangeNotifier.OnChange; DataEvents <RedirectKeyword> .OnAfterUpdate += keywordChangeNotifier.OnChange; DataEvents <RedirectKeyword> .OnDeleted += keywordChangeNotifier.OnChange; DataEvents <IPage> .OnAfterAdd += pageChangeNotifier.OnChange; DataEvents <IPage> .OnAfterUpdate += pageChangeNotifier.OnChange; DataEvents <IPage> .OnDeleted += pageChangeNotifier.OnChange; DataEvents <RedirectKeyword> .OnBeforeAdd += beforeKeywordChangeNotifier.OnChange; DataEvents <RedirectKeyword> .OnBeforeUpdate += beforeKeywordChangeNotifier.OnChange; var functions = MvcFunctionRegistry.NewFunctionCollection(); RegisterFunctions(functions); RegisterFunctionRoutes(functions); UrlToEntityTokenFacade.Register(new KeywordsUrlToEntityTokenMapper()); }