terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches

◆ Save()

bool Terraria.IO.Preferences.Save ( bool canCreateFile = true)
inline

Definition at line 173 of file Preferences.cs.

174 {
175 object @lock = this._lock;
178 if (onSave != null)
179 {
180 }
181 string path = this._path;
182 if (onSave == null)
183 {
184 }
185 long num = 0L;
186 bool flag = FileUtilities.Exists(path, num != 0L);
188 string path2 = this._path;
189 if (onSave == null)
190 {
191 }
192 string path3 = this._path;
193 if (onSave == null)
194 {
195 }
196 if (this.UseBson)
197 {
200 }
202 string path4 = this._path;
204 string path5 = this._path;
205 string text;
206 if (text == null)
207 {
208 string path6 = this._path;
209 long num2 = 0L;
210 int num3 = 7;
211 if (num2 != 0L)
212 {
213 throw new OutOfMemoryException();
214 }
215 if (num3 != 0)
216 {
217 }
218 }
219 throw new OutOfMemoryException();
220 }
class f__AnonymousType0<< Count > j__TPar
static JsonSerializer Create()
static DirectoryInfo GetParent(string path)
Definition Directory.cs:10
static void Enter(object obj)
Definition Monitor.cs:11
Dictionary< string, object > _data
readonly object _lock
readonly string _path
Action< Preferences > OnSave
readonly JsonSerializerSettings _serializerSettings
static bool Exists(string path, bool cloud=false)

References Terraria.IO.Preferences._data, Terraria.IO.Preferences._lock, Terraria.IO.Preferences._path, Terraria.IO.Preferences._serializerSettings, System.IO.DirectoryInfo.Create(), Newtonsoft.Json.JsonSerializer.Create(), System.Threading.Monitor.Enter(), Terraria.Utilities.FileUtilities.Exists(), System.IO.Directory.GetParent(), j__TPar, System.L, Terraria.IO.Preferences.OnSave, System.text, and Terraria.IO.Preferences.UseBson.

Referenced by Terraria.IO.Preferences.Put(), Terraria.Main.SaveSettings(), and Terraria.Main.TryPickingDefaultUIScale().