Пример #1
0
 public void Save <T>(T data, bool indent = false)
 {
     Files.WriteText(FullPath, Serialize(data, indent), EncryptionProvider);
 }
Пример #2
0
 public T Load <T>(T defaultValue = default)
 {
     return(File.Exists(FullPath) ? Deserialize <T>(Files.ReadText(FullPath, EncryptionProvider)) : defaultValue);
 }
Пример #3
0
 public JsonFile(SaveLocation saveLocation, string relativePath)
 {
     FullPath = Files.GetPath(saveLocation, relativePath);
 }