public void Initialize(InitializationEngine context) { _notifier = context.Locate.Advanced.GetInstance <INotifier>(); _contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); _contentEvents.PublishedContent += OnPublishedContent; }
public void Initialize(InitializationEngine context) { _contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); _subscriptionService = context.Locate.Advanced.GetInstance <ISubscriptionService>(); _contentEvents.PublishedContent += OnPublishedContent; }
public void Initialize(InitializationEngine context) { // hook up events for indexing IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.CreatingContent += EventsOnCreatingContent; }
public void Initialize(InitializationEngine context) { IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.PublishingContent += ContentEvents.BindTwoWayRelationalContent; events.MovingContent += ContentEvents.RemoveRelationalContent; }
public void Initialize(EPiServer.Framework.Initialization.InitializationEngine context) { IContentEvents contentEvents = ServiceLocator.Current.GetInstance <IContentEvents>(); contentEvents.CreatedContent += ContentEventsOnCreatedContent; contentEvents.DeletedContent += ContentEventsOnDeletedContent; contentEvents.SavedContent += ContentEventsOnSavedContent; }
public void Initialize(InitializationEngine context) { _tagService = ServiceLocator.Current.GetInstance<ITagService>(); _contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>(); _contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); _contentEvents.PublishedContent += OnPublishedContent; }
public void Initialize(InitializationEngine context) { this._tagService = ServiceLocator.Current.GetInstance<ITagService>(); this._contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>(); this._contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); this._contentEvents.PublishedContent += OnPublishedContent; }
public void Initialize(InitializationEngine context) { _contentLoader = context.Locate.Advanced.GetInstance <IContentLoader>(); _templateRepository = context.Locate.Advanced.GetInstance <IVirtualTemplateRepository>(); _contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); _contentEvents.DeletingContent += ContentEvents_DeletingContent; _contentEvents.PublishedContent += ContentEvents_PublishedContent; _contentEvents.MovedContent += ContentEvents_MovedContent; }
public UpdateProjectInfo(IContentEvents contentEvents, IProjectEnhancementsStore projectEnhancementsStore, CurrentProject currentProject, ProjectOptions projectOptions) { _contentEvents = contentEvents; _projectEnhancementsStore = projectEnhancementsStore; _currentProject = currentProject; _projectOptions = projectOptions; }
public void Initialize(InitializationEngine context) { if (!initialized) { loader = context.Locate.ContentLoader(); events = context.Locate.ContentEvents(); events.CreatingContent += Events_CreatingContent; initialized = true; } }
public void Initialize(InitializationEngine context) { IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.CreatingContent += CreatingContent; var partialRouter = new BookPartialRouter(); RouteTable.Routes.RegisterPartialRouter <SitePageData, Category>(partialRouter); }
public AzureAdSecurityEpiserverProvider(IContentRepository contentRepository, IAzureAdSecuritySettingsProvider providerFallback, IContentEvents contentEvents, IContentVersionRepository contentVersionRepository, ICustomVirtualRolesWatcher rolesWatcher) { ContentRepository = contentRepository; ProviderFallback = providerFallback; ContentEvents = contentEvents; ContentVersionRepository = contentVersionRepository; RolesWatcher = rolesWatcher; }
public void Initialize(InitializationEngine context) { contentRepository = context.Locate.Advanced.GetInstance<IContentRepository>(); events = context.Locate.Advanced.GetInstance<IContentEvents>(); events.CreatingContent += CreatingContent; var partialRouter = new BlogPartialRouter(); RouteTable.Routes.RegisterPartialRouter<BlogStartPage, Category>(partialRouter); }
public void Initialize(InitializationEngine context) { contentEv = context.Locate.ContentEvents(); contentEv.PublishedContent += ContentEv_PublishedContent; catalogEv = ServiceLocator.Current.GetInstance <ICatalogEvents>(); catalogEv.EntryUpdated += CatalogEv_EntryUpdated; evListner = Event.Get(CatalogEventBroadcaster.CommerceProductUpdated); evListner.Raised += EvListner_Raised; }
/// <summary> /// Assigns private variables, and wires up content events /// </summary> /// <param name="context"></param> public void Initialize(InitializationEngine context) { _contentEvents = context.Locate.ContentEvents(); _contentRepository = context.Locate.ContentRepository(); _vulcanHandler = context.Locate.Advanced.GetInstance <IVulcanHandler>(); // todo: Add content events to work with content area attribute to sync block changes that are searchable. _contentEvents.PublishedContent += Service_PublishedContent; _contentEvents.MovedContent += Service_MovedContent; _contentEvents.DeletedContent += Service_DeletedContent; _contentEvents.DeletedContentLanguage += Service_DeletedContentLanguage; }
public void Initialize(InitializationEngine context) { IContentEvents events = context.Locate.Advanced.GetInstance <IContentEvents>(); events.PublishedContent += IndexingEvents.UpdateIndex; events.DeletingContent += IndexingEvents.DeleteFromIndex; events.MovedContent += IndexingEvents.UpdateIndex; events.SavedContent += IndexingEvents.UpdateIndex; IContentSecurityRepository contentSecurityRepository = context.Locate.Advanced.GetInstance <IContentSecurityRepository>(); contentSecurityRepository.ContentSecuritySaved += IndexingEvents.UpdateIndex; }
public void Initialize(InitializationEngine context) { Indexing.Instance.ExcludeType <SynonymBackupFile>(); Indexing.Instance.ExcludeType <SynonymBackupFileFolder>(); IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.PublishedContent += IndexingEvents.UpdateIndex; events.DeletingContent += IndexingEvents.DeleteFromIndex; events.MovedContent += IndexingEvents.UpdateIndex; IContentSecurityRepository contentSecurityRepository = context.Locate.Advanced.GetInstance <IContentSecurityRepository>(); contentSecurityRepository.ContentSecuritySaved += IndexingEvents.UpdateIndex; }
public void Initialize(InitializationEngine context) { _cacheManager = ServiceLocator.Current.GetInstance <ICacheManager>(); _contentEvents = ServiceLocator.Current.GetInstance <IContentEvents>(); _contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>(); _contentEvents.PublishedContent += Instance_ContentChangedUpdateCache; _contentEvents.MovedContent += Instance_ContentChangedUpdateCache; _contentEvents.DeletedContent += Instance_ContentChangedUpdateCache; _contentEvents.SavedContent += Instance_ContentChangedUpdateCache; _contentEvents.MovingContent += Instance_ContentChangedUpdateCache; _contentEvents.MovingContent += MovingContent; _contentEvents.PublishingContent += Instance_ContentPublishing; _contentEvents.PublishedContent += Instance_ContentPublished; _contentEvents.CreatedContent += Instance_CreateYearMonthContainersForNewsPages; }
public void Initialize(InitializationEngine context) { Indexing.Instance.ExcludeType <SynonymBackupFile>(); Indexing.Instance.ExcludeType <SynonymBackupFileFolder>(); IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.PublishedContent += IndexingEvents.UpdateIndex; events.DeletingContent += IndexingEvents.DeleteFromIndex; events.MovedContent += IndexingEvents.UpdateIndex; //INFO: Might be useful later for re-indexing upon ACL changes //IContentSecurityRepository contentSecurityRepository = ServiceLocator.Current.GetInstance<IContentSecurityRepository>(); //contentSecurityRepository.ContentSecuritySaved += ... }
public void Uninitialize( CatalogKeyEventBroadcaster catalogKeyEventBroadcaster, ICatalogEvents catalogEvents, IContentEvents contentEvents) { catalogKeyEventBroadcaster.PriceUpdated -= OnPriceUpdated; catalogEvents.AssociationUpdating -= OnAssociationUpdated; contentEvents.CreatedContent -= OnCreatedContent; contentEvents.DeletedContent -= OnDeletedContent; contentEvents.DeletingContent -= OnDeletingContent; contentEvents.MovedContent -= OnMovedContent; contentEvents.PublishedContent -= OnPublishedContent; }
public void Uninitialize(InitializationEngine context) { if (!LuceneConfiguration.Active) { return; } IContentEvents contentEvents = context.Locate.ContentEvents(); IContentSecurityRepository securityRepository = context.Locate.ContentSecurityRepository(); contentEvents.PublishedContent -= new EventHandler <ContentEventArgs>(PublishContent); contentEvents.MovedContent -= new EventHandler <ContentEventArgs>(MovedContent); contentEvents.DeletedContent -= new EventHandler <DeleteContentEventArgs>(DeleteContent); contentEvents.DeletedContentLanguage -= new EventHandler <ContentEventArgs>(DeleteContentLanguage); securityRepository.ContentSecuritySaved -= new EventHandler <ContentSecurityEventArg>(UpdateSecurity); }
public void Initialize(InitializationEngine context) { _contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); _contentSecurityRepository = context.Locate.Advanced.GetInstance <IContentSecurityRepository>(); _contentLoader = context.Locate.Advanced.GetInstance <IContentLoader>(); _contentCacheKeyCreator = context.Locate.Advanced.GetInstance <IContentCacheKeyCreator>(); _htmlCache = context.Locate.Advanced.GetInstance <IDistributedCache>(); _contentEvents.CreatedContent += ContentCreated; _contentEvents.MovedContent += MovedContent; _contentEvents.PublishingContent += PublishingContent; _contentEvents.PublishedContent += PublishedContent; _contentEvents.DeletedContent += DeletedContent; _contentSecurityRepository.ContentSecuritySaved += ContentSecuritySaved; }
public void Initialize(InitializationEngine context) { System.Web.Mvc.ViewEngines.Engines.Add(new XhtmlStringViewEngine(new XhtmlStringRenderer(context.Locate.Advanced.GetInstance <IRenderingContextResolver>()))); _htmlCache = context.Locate.Advanced.GetInstance <DefaultHtmlCache>(); _contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); _contentSecurityRepository = context.Locate.Advanced.GetInstance <IContentSecurityRepository>(); _contentLoader = context.Locate.Advanced.GetInstance <IContentLoader>(); _contentEvents.CreatedContent += ContentCreated; _contentEvents.MovedContent += MovedContent; _contentEvents.PublishingContent += PublishingContent; _contentEvents.PublishedContent += PublishedContent; _contentEvents.DeletedContent += DeletedContent; _contentSecurityRepository.ContentSecuritySaved += ContentSecuritySaved; }
public void Initialize(InitializationEngine context) { if (!LuceneConfiguration.Active) { return; } IContentEvents contentEvents = context.Locate.ContentEvents(); IContentSecurityRepository securityRepository = context.Locate.ContentSecurityRepository(); contentEvents.PublishedContent += new EventHandler <ContentEventArgs>(PublishContent); contentEvents.MovedContent += new EventHandler <ContentEventArgs>(MovedContent); contentEvents.DeletedContent += new EventHandler <DeleteContentEventArgs>(DeleteContent); contentEvents.DeletedContentLanguage += new EventHandler <ContentEventArgs>(DeleteContentLanguage); securityRepository.ContentSecuritySaved += new EventHandler <ContentSecurityEventArg>(UpdateSecurity); _indexingHandler.Value.Init(); _remoteContentIndexRepository.Value.Init(); DoingHealthCheck(); }
public void Initialize(InitializationEngine context) { //We do not want to index catalog content types, since we are creating our own objects below ContentIndexer.Instance.Conventions.ForInstancesOf <FashionItemContent>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <FashionProductContent>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <WineSKUContent>().ShouldIndex(x => false); // other page types we do not want in the index ContentIndexer.Instance.Conventions.ForInstancesOf <ReceiptPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <ContentFolder>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <OrdersPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <HomePage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <CartSimpleModulePage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <WishListPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <ChangePasswordPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <PersonalInformationPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <DibsPaymentPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <SearchPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <DefaultPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <LoginPage>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <CheckoutPage>().ShouldIndex(x => false); // others ContentIndexer.Instance.Conventions.ForInstancesOf <NotificationSettings>().ShouldIndex(x => false); // blocks ContentIndexer.Instance.Conventions.ForInstancesOf <YouTubeBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <ViddlerBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <VimeoBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <TwoColumnsBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <SocialMediaLinkBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <ButtonWithHelpLinkBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <SliderBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <OneTwoColumnsBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <PageListBlock>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <ImageFile>().ShouldIndex(x => false); ContentIndexer.Instance.Conventions.ForInstancesOf <GenericFile>().ShouldIndex(x => false); // hook up events // maybe read this http://talk.alfnilsson.se/2013/03/17/simplifying-event-handling-in-episechess.crver-7-cms/ IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.PublishedContent += (sender, e) => events_PublishedContent(sender, e); }
public SettingsService( IContentRepository contentRepository, ContentRootService contentRootService, ITypeScannerLookup typeScannerLookup, IContentTypeRepository contentTypeRepository, IContentEvents contentEvents, ISiteDefinitionEvents siteDefinitionEvents, ISiteDefinitionRepository siteDefinitionRepository, ISiteDefinitionResolver siteDefinitionResolver, IHttpContextAccessor httpContextAccessor) { _contentRepository = contentRepository; _contentRootService = contentRootService; _typeScannerLookup = typeScannerLookup; _contentTypeRepository = contentTypeRepository; _contentEvents = contentEvents; _siteDefinitionEvents = siteDefinitionEvents; _siteDefinitionRepository = siteDefinitionRepository; _siteDefinitionResolver = siteDefinitionResolver; _httpContextAccessor = httpContextAccessor; }
/// <summary> /// Initializes this instance. /// </summary> /// <param name="context">The context.</param> /// <remarks>Gets called as part of the EPiServer Framework initialization sequence. Note that it will be called /// only once per AppDomain, unless the method throws an exception. If an exception is thrown, the initialization /// method will be called repeatedly for each request reaching the site until the method succeeds.</remarks> /// <exception cref="T:EPiServer.ServiceLocation.ActivationException">if there is are errors resolving the service instance.</exception> public void Initialize(InitializationEngine context) { if ((context == null) || (context.HostType != HostType.WebApplication)) { return; } if (initialized) { return; } settingsService = context.Locate.Advanced.GetInstance <ISettingsService>(); contentEvents = context.Locate.Advanced.GetInstance <IContentEvents>(); localizationService = context.Locate.Advanced.GetInstance <LocalizationService>(); context.InitComplete += InitCompleteHandler; contentEvents.PublishedContent += PublishedContent; contentEvents.MovingContent += MovingContent; contentEvents.DeletingContent += DeletingContent; initialized = true; }
public void Uninitialize(InitializationEngine context) { IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>(); events.CreatingContent -= CreatingContent; }
public void Initialize(IContentEvents contentEvents, IContentLoader contentQueryable, IEnterpriseSettings enterpriseSetting) { throw new NotImplementedException(); }
public CatalogContentEventIndexer(ILogger logger, IContentEvents contentEvents) { _log = logger; _contentEvents = contentEvents; }
public void Initialize(InitializationEngine context) { // routing fund. //CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes,, false); // routing adv. CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, () => { // the scheduled job still have troubles var contentLoader = ServiceLocator.Current.GetInstance <IContentLoader>(); // If epi-Find-error in exercise, it's the "catalog start" var startPage = new ContentReference(9); //var startPage = contentLoader.Get<PageData>(ContentReference.StartPage); if (startPage == null) // should maybe check for the "setting-prop" { return(ContentReference.WasteBasket); //.StartPage; } //var homePage = startPage as StartPage; //return homePage != null ? homePage.Settings.catalogStartPageLink : ContentReference.StartPage; // if Find issues return(startPage); } , false); #region Partial Routing Simplified... Conceptually //CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, () => //{ // var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>(); // var startPage = contentLoader.Get<StartPage>(ContentReference.StartPage); // return startPage.Settings.catalogStartPageLink; //} //, false); #endregion #region Events CMS & ECF // Nice for Entry Pricing and Inventory updates CatalogKeyEventBroadcaster e = ServiceLocator.Current.GetInstance <CatalogKeyEventBroadcaster>(); e.PriceUpdated += e_PriceUpdated; e.InventoryUpdated += e_InventoryUpdated; Event.Get(CatalogEventBroadcaster.CommerceProductUpdated).Raised += EB; // this is the old one for Orders //OrderContext.Current.OrderGroupUpdated += Current_OrderGroupUpdated; // Good stuff for Orders ...\Infrastructure\CartAndCheckout\NewOrderEvents.cs //IOrderRepositoryCallback orc = // ServiceLocator.Current.GetInstance<IOrderRepositoryCallback>(); IContentEvents e2 = ServiceLocator.Current.GetInstance <IContentEvents>(); // ...the way to go e2.RequestedApproval += E2_RequestedApproval; e2.PublishedContent += E2_PublishedContent; #endregion // new in 10.1.0 SetPromotionExclusions(context); }
public void Initialize(IContentEvents contentEvents, IContentLoader contentQueryable, IEnterpriseSettings enterpriseSetting) { throw new NotImplementedException(); }
public ListenCommand(IContentEvents contentEvents) { _events = contentEvents; }