Esempio n. 1
0
 public static AppConfig LoadFrom(string filename)
 {
   try
   {
     if (File.Exists(filename))
       return SerializationHelper.Deserialize<AppConfig>(filename, _SerializerType);
   }
   catch (Exception ex)
   {
     HostCore.Log.Error("Could not load the application configuration.", ex);
   }
   var r = new AppConfig();
   r.LoadDefaults();
   return r;
 }
Esempio n. 2
0
 public static bool SaveTo(AppConfig cnf, string filename)
 {
   return SerializationHelper.TrySerialize(filename, cnf, _SerializerType);
 }
Esempio n. 3
0
 public static bool SaveTo(AppConfig cnf, string filename)
 {
     return(SerializationHelper.TrySerialize(filename, cnf, _SerializerType));
 }