예제 #1
0
        private void ContentServiceOnDeleted(IContentService sender, DeleteEventArgs <IContent> SaveEventArgs)
        {
            IndexingRepository indexingRepository = new IndexingRepository((ICmsIndexer) new UmbracoIndexer(), (ILogFacade) new LogFacade(typeof(IndexingRepository)));

            foreach (var n in SaveEventArgs.DeletedEntities)
            {
                indexingRepository.DeleteFromIndex(n.Id);
            }
        }
예제 #2
0
        private void ContentServiceOnTrashed(IContentService sender, MoveEventArgs <IContent> MoveEventArgs)
        {
            IndexingRepository indexingRepository = new IndexingRepository((ICmsIndexer) new UmbracoIndexer(), (ILogFacade) new LogFacade(typeof(IndexingRepository)));

            indexingRepository.DeleteFromIndex(MoveEventArgs.Entity.Id);
        }