Beispiel #1
0
        public static T Load <T>() where T : SettingsFileBase, new()
        {
            if (_cfg != null)
            {
                return(_cfg as T);
            }

            var tmpCfg = new T();
            var str    = tmpCfg.ReadSettingsFile();

            if (str.IsBlank())
            {
                return(null);
            }
            _cfg = tmpCfg.DeserializeStr <T>(str);
            return(_cfg as T);
        }
Beispiel #2
0
 protected abstract string SerializeObj(SettingsFileBase obj);