Ejemplo n.º 1
0
 public void AddDictionary(string name)
 {
     if (!Has(name))
     {
         _dictNames.Add(name);
         var dict = new SymbolDictionary <T> {
             Name = name, Database = Database
         };
         Add(name, dict);
     }
 }
Ejemplo n.º 2
0
        private SymbolDictionary <T> Load(string key)
        {
            XElement xe   = ZipUtils.Extract(Database.FileName, GetDictRealName(key));
            var      dict = new SymbolDictionary <T> {
                Name = key, Database = Database
            };

            foreach (var e in xe.Elements())
            {
                dict.Add(FromX(e));
            }
            Add(key, dict);
            return(dict);
        }
Ejemplo n.º 3
0
 public bool Has(string key, out SymbolDictionary <T> dict)
 {
     dict = null;
     if (base.Has(key))
     {
         dict = base[key];
     }
     else if (Has(key))
     {
         dict = Load(key);
     }
     else
     {
         return(false);
     }
     return(true);
 }