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
ThreadSafeStore.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x02000055 RID: 85
10 internal class ThreadSafeStore<TKey, TValue>
11 {
12 // Token: 0x06000310 RID: 784 RVA: 0x000092D4 File Offset: 0x000074D4
13 [Preserve]
15 {
16 do
17 {
18 base..ctor();
19 }
20 while (creator == null);
21 this._creator = creator;
22 this._store = 1;
23 }
24
25 // Token: 0x06000311 RID: 785 RVA: 0x000092F8 File Offset: 0x000074F8
26 [Preserve]
27 public TValue Get(TKey key)
28 {
29 /*
30An exception occurred when decompiling this method (06000311)
31
32ICSharpCode.Decompiler.DecompilerException: Error decompiling TValue Newtonsoft.Json.Utilities.ThreadSafeStore`2::Get(TKey)
33
34 ---> System.Exception: Basic block has to end with unconditional control flow.
35{
36 Block_0:
37 stloc:Dictionary`2(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<!TKey, !TValue>[exp:Dictionary`2](ThreadSafeStore`2::_store, ldloc:ThreadSafeStore`2(this)))
38}
39
40 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
41 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
42 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
43 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
44 --- End of inner exception stack trace ---
45 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
46 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
47*/;
48 }
49
50 // Token: 0x06000312 RID: 786 RVA: 0x0000930C File Offset: 0x0000750C
51 [Preserve]
52 private TValue AddValue(TKey key)
53 {
54 Func creator = this._creator;
55 object @lock = this._lock;
57 Dictionary store = this._store;
58 if (store != null)
59 {
60 }
61 this._store = store;
62 Dictionary store2 = this._store;
63 this._store = store;
66 throw new OutOfMemoryException();
67 }
68
69 // Token: 0x04000194 RID: 404
70 private readonly object _lock;
71
72 // Token: 0x04000195 RID: 405
74
75 // Token: 0x04000196 RID: 406
77 }
78}
class f__AnonymousType0<< Count > j__TPar
readonly Func< TKey, TValue > _creator
ThreadSafeStore(Func< TKey, TValue > creator)
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11