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
ManifestBasedResourceGroveler.cs
Go to the documentation of this file.
1using System;
5using System.IO;
8
9namespace System.Resources
10{
11 // Token: 0x020004B2 RID: 1202
13 {
14 // Token: 0x060022F4 RID: 8948 RVA: 0x0004E8D8 File Offset: 0x0004CAD8
19
20 // Token: 0x060022F5 RID: 8949 RVA: 0x0004E8F4 File Offset: 0x0004CAF4
22 {
24 bool hasInvariantCultureName = cultureInfo.HasInvariantCultureName;
25 if (this._mediator._rm._fallbackLoc != UltimateResourceFallbackLocation.MainAssembly && this.GetSatelliteAssembly(cultureInfo, stackMark) == null)
26 {
27 bool hasInvariantCultureName2 = culture.HasInvariantCultureName;
29 }
30 ResourceManager rm = this._mediator._rm;
32 if (runtimeAssembly != null)
33 {
34 long num = 0L;
36 if (num != 0L || 7 != 0)
37 {
38 goto IL_0082;
39 }
40 Stream stream;
41 if (stream != null)
42 {
43 return this.CreateResourceSet(stream, runtimeAssembly);
44 }
45 }
46 if (true)
47 {
48 bool hasInvariantCultureName3 = culture.HasInvariantCultureName;
49 }
50 IL_0082:
51 throw new OutOfMemoryException();
52 }
53
54 // Token: 0x060022F6 RID: 8950 RVA: 0x0004E9A8 File Offset: 0x0004CBA8
67
68 // Token: 0x060022F7 RID: 8951 RVA: 0x0004EA04 File Offset: 0x0004CC04
77
78 // Token: 0x060022F8 RID: 8952 RVA: 0x0004EA40 File Offset: 0x0004CC40
79 internal ResourceSet CreateResourceSet(Stream store, Assembly assembly)
80 {
82 if (store != null)
83 {
85 object obj;
86 if (obj != null)
87 {
88 }
89 if (store != null)
90 {
91 object obj2;
92 if (obj2 != null)
93 {
94 if (obj2 == null)
95 {
96 throw new InvalidCastException();
97 }
98 if (obj2 == null)
99 {
100 goto IL_0040;
101 }
102 }
103 ResourceManager rm = this._mediator._rm;
104 Type userResourceSet3 = rm._userResourceSet;
105 if (rm == null)
106 {
107 }
108 string baseNameField = rm.BaseNameField;
109 object obj3;
110 while (obj3 == null)
111 {
112 }
113 throw new InvalidCastException();
114 }
115 }
116 IL_0040:
117 throw new ArrayTypeMismatchException();
118 }
119
120 // Token: 0x060022F9 RID: 8953 RVA: 0x0004EB18 File Offset: 0x0004CD18
122 {
125 RuntimeAssembly callingAssembly = mediator._rm.m_callingAssembly;
128 Stream stream;
129 if (stream != null)
130 {
131 return stream;
132 }
133 return this.CaseInsensitiveManifestResourceStreamLookup(satellite, fileName);
134 }
135
136 // Token: 0x060022FA RID: 8954 RVA: 0x0004EB6C File Offset: 0x0004CD6C
138 {
140 if (this._mediator._rm._locationInfo == null || name != null)
141 {
142 }
144 object evidence = satellite._evidence;
145 long num = 0L;
146 if (invariantCulture != null)
147 {
148 }
149 if (num == 0L)
150 {
151 if (num != 0L)
152 {
155 RuntimeAssembly callingAssembly = mediator._rm.m_callingAssembly;
157 Stream stream;
158 return stream;
159 }
160 }
161 throw new ArrayTypeMismatchException();
162 }
163
164 // Token: 0x060022FB RID: 8955 RVA: 0x0004EC04 File Offset: 0x0004CE04
183
184 // Token: 0x060022FC RID: 8956 RVA: 0x0004EC98 File Offset: 0x0004CE98
186 {
187 ResourceManager rm = this._mediator._rm;
188 Type userResourceSet = rm._userResourceSet;
189 if (rm == null)
190 {
191 }
193 if (readerTypeName != null)
194 {
195 if (rm == null)
196 {
197 }
198 string baseNameField = rm.BaseNameField;
199 }
200 if (resSetTypeName != null)
201 {
202 if (rm == null)
203 {
204 }
205 Hashtable resourceSets2 = rm.ResourceSets;
206 }
207 return true;
208 }
209
210 // Token: 0x060022FD RID: 8957 RVA: 0x0004ECE4 File Offset: 0x0004CEE4
212 {
213 IntPtr mono_assembly = this._mediator.MainAssembly._mono_assembly;
214 string text;
215 return text;
216 }
217
218 // Token: 0x060022FE RID: 8958 RVA: 0x0004ED04 File Offset: 0x0004CF04
230
231 // Token: 0x060022FF RID: 8959 RVA: 0x0004EDB0 File Offset: 0x0004CFB0
232 private void HandleResourceStreamMissing(string fileName)
233 {
235 ResourceManager rm = this._mediator._rm;
236 Environment.FailFast("mscorlib.resources couldn't be found! Large parts of the BCL won't work!");
237 ResourceManager rm2 = this._mediator._rm;
238 Type locationInfo = rm2._locationInfo;
239 if (rm2 == null)
240 {
241 }
242 if (this._mediator._rm._locationInfo != null)
243 {
245 }
246 string text2;
247 string text = text2 + fileName;
248 throw new ArrayTypeMismatchException();
249 }
250
251 // Token: 0x06002300 RID: 8960 RVA: 0x0004EE48 File Offset: 0x0004D048
253 {
256 {
257 string <CultureName>k__BackingField = neutralResourcesLanguageAttribute.<CultureName>k__BackingField;
259 }
260 return true;
261 }
262
263 // Token: 0x04001322 RID: 4898
265 }
266}
class f__AnonymousType0<< Count > j__TPar
static void FailFast(string message)
static CultureInfo InvariantCulture
RuntimeAssembly InternalGetSatelliteAssembly(string name, CultureInfo culture, Version version, bool throwOnFileNotFound, StackCrawlMark stackMark)
Definition Assembly.cs:243
RuntimeAssembly GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark stackMark)
Stream GetManifestResourceStream(RuntimeAssembly satellite, string fileName, StackCrawlMark stackMark)
ManifestBasedResourceGroveler(ResourceManager.ResourceManagerMediator mediator)
Stream CaseInsensitiveManifestResourceStreamLookup(RuntimeAssembly satellite, string name)
ResourceSet CreateResourceSet(Stream store, Assembly assembly)
CultureInfo UltimateFallbackFixup(CultureInfo lookForCulture)
bool CanUseDefaultResourceClasses(string readerTypeName, string resSetTypeName)
static bool GetNeutralResourcesLanguageAttribute(Assembly assembly, string cultureName, short fallbackLocation)
static CultureInfo GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation fallbackLocation)
ResourceSet GrovelForResourceSet(CultureInfo culture, Dictionary< string, ResourceSet > localResourceSets, bool tryParents, bool createIfNotExists, StackCrawlMark stackMark)
UltimateResourceFallbackLocation _fallbackLoc
static void Exit(object obj)
Definition Monitor.cs:47