private static MorphItem GetMorphItem(IMoForm mf, ITsString tssName, ILexSense sense, ITsString tssSense, ILexEntryRef ler, int hvoLexEntry, ILexEntryInflType inflType) { IMoMorphSynAnalysis msa = null; string msaText = null; if (sense != null) { msa = sense.MorphoSyntaxAnalysisRA; if (msa != null) msaText = msa.InterlinearName; } var options = new MorphItemOptions { HvoMoForm = HvoOrZero(mf), HvoEntry = ler != null ? hvoLexEntry : 0, TssName = tssName, HvoSense = HvoOrZero(sense), SenseName = tssSense != null ? tssSense.Text : null, HvoMsa = HvoOrZero(msa), MsaName = msaText, InflType = inflType, EntryRef = ler, }; return new MorphItem(options); }
public MorphItem(MorphItemOptions options) : this(options.HvoMoForm, options.HvoEntry, options.TssName, options.HvoSense, options.SenseName, options.HvoMsa, options.MsaName) { m_inflType = options.InflType; m_entryRef = options.EntryRef; if (m_entryRef != null) { var entry = GetMainEntryOfVariant(m_entryRef); m_hvoMainEntryOfVariant = entry.Hvo; } }