public int CountDictionaryEntries(DictionaryConfigurationModel config) { int[] entries; using (ClerkActivator.ActivateClerkMatchingExportType(DictionaryType, m_mediator)) ConfiguredXHTMLGenerator.GetPublicationDecoratorAndEntries(m_mediator, out entries, DictionaryType); return(entries.Count(e => IsGenerated(m_cache, config, e))); }
public void ExportDictionaryContent(string xhtmlPath, DictionaryConfigurationModel configuration = null, IThreadedProgress progress = null) { using (ClerkActivator.ActivateClerkMatchingExportType(DictionaryType, m_mediator)) { configuration = configuration ?? new DictionaryConfigurationModel( DictionaryConfigurationListener.GetCurrentConfiguration(m_mediator, "Dictionary"), m_cache); ExportConfiguredXhtml(xhtmlPath, configuration, DictionaryType, progress); } }
public void ExportReversalContent(string xhtmlPath, string reversalWs = null, DictionaryConfigurationModel configuration = null, IThreadedProgress progress = null) { using (ClerkActivator.ActivateClerkMatchingExportType(ReversalType, m_mediator)) using (ReversalIndexActivator.ActivateReversalIndex(reversalWs, m_mediator, m_cache)) { configuration = configuration ?? new DictionaryConfigurationModel( DictionaryConfigurationListener.GetCurrentConfiguration(m_mediator, "ReversalIndex"), m_cache); ExportConfiguredXhtml(xhtmlPath, configuration, ReversalType, progress); } }
/// <summary> /// Produce a table of reversal index ShortNames and the count of the entries in each of them. /// The reversal indexes included will be limited to those ShortNames specified in selectedReversalIndexes. /// </summary> public SortedDictionary <string, int> GetCountsOfReversalIndexes(IEnumerable <string> selectedReversalIndexes) { using (ClerkActivator.ActivateClerkMatchingExportType(ReversalType, m_mediator)) { var relevantReversalIndexesAndTheirCounts = m_cache.ServiceLocator.GetInstance <IReversalIndexRepository>().AllInstances() .Select(repo => m_cache.ServiceLocator.GetObject(repo.Guid) as IReversalIndex) .Where(ri => ri != null && selectedReversalIndexes.Contains(ri.ShortName)) .ToDictionary(ri => ri.ShortName, CountReversalIndexEntries); return(new SortedDictionary <string, int> (relevantReversalIndexesAndTheirCounts)); } }