/// <summary> /// Indexer Component to use for indexing /// </summary> /// <param name="splitter">Splitter to be used</param> /// <param name="extractType">Split Type: Comment / Source code</param> /// <param name="dictionary">Dictionary to be used. Is safe to share among processes.</param> /// <param name="textExtractors">Text extractors to be used. Is safe to share among processes.</param> /// <param name="textCorrector">Text Corrector to use</param> /// <param name="stemmer">Stemmer to be used.</param> /// <param name="filesToScan">Files to scan.</param> /// <param name="notificationHandler">Notification handler. Use null to not receive any notification. Default action will be used in case of exceptions. Is safe to share among processes.</param> private IndexerConfiguration(ISplitter splitter, ExtractType extractType, IDictionary dictionary, IList <ITextExtractor> textExtractors, ITextCorrector textCorrector, IStemmer stemmer, List <IndexerFile> filesToScan, INotificationHandler notificationHandler = null) { if (dictionary == null) { throw new ArgumentNullException(nameof(dictionary)); } if (splitter == null) { throw new ArgumentNullException(nameof(splitter), "Splitter cannot be null. Try setting CustomSplitter or set UseDefaultSplitterOfType to some SplitterType."); } Splitter = splitter; ExtractType = extractType; Dictionary = dictionary; TextExtractors = textExtractors; TextCorrector = textCorrector; Stemmer = stemmer; FilesToScan = filesToScan; NotificationHandler = notificationHandler; }
/// <summary> /// Sets text corrector /// </summary> /// <param name="textCorrector">Text corrector to be used if selected. This value is optional</param> public void SetTextCorrector(ITextCorrector textCorrector) { TextCorrector = textCorrector; InitialSplitter?.SetTextCorrector(textCorrector); }