Exemple #1
0
        private static void AddVariantTypeGlossInfo(TsIncStrBldr sb, IWritingSystem wsGloss, IList <IMultiUnicode> multiUnicodeAccessors, IWritingSystem wsUser)
        {
            const string sSeriesSeparator = kDefaultSeriesSeparatorLexEntryTypeReverseAbbr;
            var          fBeginSeparator  = true;

            foreach (var multiUnicodeAccessor in multiUnicodeAccessors)
            {
                int wsActual2;
                var tssVariantTypeInfo = multiUnicodeAccessor.GetAlternativeOrBestTss(wsGloss.Handle, out wsActual2);
                // just concatenate them together separated by comma.
                if (tssVariantTypeInfo == null || tssVariantTypeInfo.Length <= 0)
                {
                    continue;
                }
                if (!fBeginSeparator)
                {
                    sb.AppendTsString(TsStringUtils.MakeTss(sSeriesSeparator, wsUser.Handle));
                }
                sb.AppendTsString((tssVariantTypeInfo));
                fBeginSeparator = false;
            }

            // Handle the special case where no reverse abbr was found.
            if (fBeginSeparator && multiUnicodeAccessors.Count > 0)
            {
                sb.AppendTsString(multiUnicodeAccessors.ElementAt(0).NotFoundTss);
            }
        }
Exemple #2
0
        private static void AddGloss(TsIncStrBldr sb, IMultiStringAccessor gloss, IWritingSystem wsGloss)
        {
            ITsString tssGloss = GetTssGloss(gloss, wsGloss);

            sb.AppendTsString(tssGloss);
        }