Exemple #1
0
        public static T Load <T>() where T : JsonSettingsBase, new()
        {
            T result = new T();

            string fileName = result.GetFullPath();

            if (File.Exists(fileName))
            {
                result = JsonFile.Load <T>(fileName);
            }

            return(result ?? new T());
        }
Exemple #2
0
 public void Save(Action <JsonSerializerSettings> updateSettings = null)
 {
     JsonFile.Save(GetFullPath(), this, updateSettings);
 }
Exemple #3
0
 public void Save()
 {
     JsonFile.Save(GetFullPath(), this);
 }