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); } }
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); }