Exemplo n.º 1
0
        public static ConfigManager NewInstance(string filepath)
        {
            FilePath = filepath;

            ConfigManager mgr = null;

            try
            {
                var serializer = new XmlFileSerializer <ConfigManager>(filepath);
                mgr = serializer.Load();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }

            return(mgr ?? (new ConfigManager()));
        }
Exemplo n.º 2
0
 /// ------------------------------------------------------------------------------------
 private void LoadFromStandardPlace()
 {
     _serializer.Load(_fields, _parentFolder.Combine("test.txt"),
                      "x", _fileType.Object);
 }