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

◆ Load()

bool Terraria.IO.Preferences.Load ( )
inline

Definition at line 93 of file Preferences.cs.

94 {
95 int num = 1;
96 object @lock = this._lock;
97 string path = this._path;
98 if (num == 0)
99 {
100 }
101 long num2 = 0L;
102 bool flag = FileUtilities.Exists(path, num2 != 0L);
103 bool useBson = this.UseBson;
104 string path2 = this._path;
105 int num4;
106 if (useBson)
107 {
108 if (num == 0)
109 {
110 }
111 long num3 = 0L;
115 num4 = 6;
116 if (useBson)
117 {
118 }
119 }
121 string text;
123 if (text == null)
124 {
125 if (serializerSettings != null)
126 {
127 throw new OutOfMemoryException();
128 }
129 int num5;
130 if (num4 == 0)
131 {
132 num5 = 5;
133 if (text != null)
134 {
135 goto IL_0089;
136 }
137 }
138 long num6 = 0L;
139 if (text == null)
140 {
141 goto IL_008D;
142 }
143 IL_0089:
144 if (useBson)
145 {
146 }
147 IL_008D:
148 if (num6 != 0L)
149 {
150 goto IL_00AB;
151 }
152 if (num5 != 0)
153 {
154 long num7 = 0L;
155 Monitor.Exit(@lock);
156 if (num7 == 0L)
157 {
158 }
159 throw new OutOfMemoryException();
160 }
161 if (this._data == null)
162 {
163 }
164 }
165 if (this.OnLoad != null)
166 {
167 }
168 IL_00AB:
169 throw new OutOfMemoryException();
170 }
class f__AnonymousType0<< Count > j__TPar
static JsonSerializer Create()
static void Exit(object obj)
Definition Monitor.cs:47
Dictionary< string, object > _data
readonly object _lock
readonly string _path
Action< Preferences > OnLoad
readonly JsonSerializerSettings _serializerSettings
static byte[] ReadAllBytes(string path, bool cloud=false)
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.array, Newtonsoft.Json.JsonSerializer.Create(), Terraria.Utilities.FileUtilities.Exists(), System.Threading.Monitor.Exit(), j__TPar, System.L, Terraria.IO.Preferences.OnLoad, Terraria.Utilities.FileUtilities.ReadAllBytes(), System.text, and Terraria.IO.Preferences.UseBson.