コード例 #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());
        }
コード例 #2
0
 public void Save(Action <JsonSerializerSettings> updateSettings = null)
 {
     JsonFile.Save(GetFullPath(), this, updateSettings);
 }
コード例 #3
0
 public void Save()
 {
     JsonFile.Save(GetFullPath(), this);
 }