Exemple #1
0
        public override T Load <T>(string table, string section, LoadOptimizer <T> optimizer)
        {
            try
            {
                Serializer serializer = new Serializer();
                if (String.IsNullOrEmpty(table) || String.IsNullOrEmpty(section) || optimizer == null)
                {
                    return(default(T));
                }
                if (_sectionDictionary.ContainsKey(table) && _sectionDictionary[table].ContainsKey(section))
                {
                    return(optimizer.Convert(serializer.SerializeToString(_sectionDictionary[table][section])));
                }

                return(default(T));
            }
            catch (Exception ex)
            {
                return(default(T));
            }
        }
Exemple #2
0
 public abstract T Load <T>(string table, string section, LoadOptimizer <T> optimizer);