Exemple #1
0
 /// <summary>
 /// Created default config to specified path
 /// </summary>
 public virtual void DefaultConfig(string configName)
 {
     if (File.Exists(configName))
     {
         return;
     }
     JSONConfigManager.WriteFile(Settings, configName);
 }
Exemple #2
0
 /// <summary>
 /// Creates new configuration if it does not exists
 /// </summary>
 /// <param name="configName">path or name of config</param>
 /// <param name="objToWrite">Object to write</param>
 public static void DefaultConfig <T>(string configName, T objToWrite)
 {
     if (File.Exists(configName))
     {
         return;
     }
     JSONConfigManager.WriteFile(objToWrite, configName);
 }
Exemple #3
0
 /// <summary>
 /// Saves Setings object to latest used configuration
 /// </summary>
 /// <returns>return is not required</returns>
 public override byte[] SaveSettings()
 {
     JSONConfigManager.WriteFile(Settings, lastConfigName);
     return(null);
 }
Exemple #4
0
 /// <summary>
 /// Rewrites configuration
 /// </summary>
 public static void RewriteConfiguration <T>(string configFileName, T configs)
 {
     JSONConfigManager.WriteFile(configs, configFileName);
 }
Exemple #5
0
 /// <summary>
 /// Saves Settings object to specified file
 /// </summary>
 /// <param name="configFileName">Path of file</param>
 public override void SaveSettingsToFile(string configFileName)
 {
     lastConfigName = configFileName;
     JSONConfigManager.WriteFile(Settings, configFileName);
 }