internal void ImportWordsFrag(Word[] words, ImportAnalysesLevel analysesLevel) { s_importOptions = new ImportInterlinearOptions {AnalysesLevel = analysesLevel}; var tsStrFactory = m_cache.ServiceLocator.GetInstance<ITsStrFactory>(); NonUndoableUnitOfWorkHelper.Do(m_cache.ActionHandlerAccessor, () => { foreach (var word in words) { CreateWordAnalysisStack(m_cache, word, tsStrFactory); } }); }
public void ImportWordsFrag(Func<Stream> createWordsFragDocStream, ImportAnalysesLevel analysesLevel) { using (var stream = createWordsFragDocStream.Invoke()) { var serializer = new XmlSerializer(typeof(WordsFragDocument)); var wordsFragDoc = (WordsFragDocument)serializer.Deserialize(stream); NormalizeWords(wordsFragDoc.Words); ImportWordsFrag(wordsFragDoc.Words, analysesLevel); } }