private void DocumentOnAfterPublish(Document sender, PublishEventArgs publishEventArgs)
        {
            IndexingRepository indexingRepository = new IndexingRepository((ICmsIndexer) new UmbracoIndexer(), (ILogFacade) new LogFacade(typeof(IndexingRepository)));

            indexingRepository.IndexNode(((CMSNode)sender).Id, true);
            indexingRepository.BuildSpellcheckDictionary();
        }
        private void ContentServiceOnSaved(IContentService sender, SaveEventArgs <IContent> SaveEventArgs)
        {
            IndexingRepository indexingRepository = new IndexingRepository((ICmsIndexer) new UmbracoIndexer(), (ILogFacade) new LogFacade(typeof(IndexingRepository)));

            foreach (var n in SaveEventArgs.SavedEntities)
            {
                indexingRepository.IndexNode(n.Id, false);
                indexingRepository.BuildSpellcheckDictionary();
            }
        }
        private void ContentServiceOnPublished(IPublishingStrategy sender, PublishEventArgs <IContent> publishEventArgs)
        {
            if (!publishEventArgs.PublishedEntities.Any <IContent>())
            {
                return;
            }
            IndexingRepository indexingRepository = new IndexingRepository((ICmsIndexer) new UmbracoIndexer(), (ILogFacade) new LogFacade(typeof(IndexingRepository)));
            List <int>         intList            = new List <int>();

            using (IEnumerator <IContent> enumerator = publishEventArgs.PublishedEntities.GetEnumerator())
            {
                while (((IEnumerator)enumerator).MoveNext())
                {
                    IContent current = enumerator.Current;
                    indexingRepository.IndexNode(((IEntity)current).Id, true);
                }
            }
            indexingRepository.BuildSpellcheckDictionary();
        }