private bool TryAddAlternativeKey(DictEntry entry, string alternativeKey)
 {
     if (entry.AlternativeKeys.Contains(alternativeKey)){
         return false;
     }
     entry.AlternativeKeys.Add(alternativeKey);
     return true;
 }
Exemplo n.º 2
0
 private Entry ConvertEntry(DictEntry dictEntry)
 {
     var rv = new Entry
     {
         orth = dictEntry.Key,
         infl =
             string.Join(string.Empty,
                 dictEntry.AlternativeKeys.Select(key => string.Format(_config.iformFormat, key.EscapeForXml()))),
         word = dictEntry.Key,
         phonetic = dictEntry.Attributes.ContainsKey("Phonetic") ? dictEntry.Attributes["Phonetic"] : null,
         description =
             dictEntry.Attributes.ContainsKey("Description") ? dictEntry.Attributes["Description"] : null,
     };
     return rv;
 }