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
SafeHandle.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x0200044E RID: 1102
7 [StructLayout(0)]
9 {
10 // Token: 0x06002184 RID: 8580 RVA: 0x0004C2A8 File Offset: 0x0004A4A8
11 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
19
20 // Token: 0x06002185 RID: 8581 RVA: 0x0004C2D8 File Offset: 0x0004A4D8
21 protected override void Finalize()
22 {
23 base.Finalize();
24 }
25
26 // Token: 0x06002186 RID: 8582 RVA: 0x0004C30C File Offset: 0x0004A50C
27 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
28 protected void SetHandle(IntPtr handle)
29 {
31 }
32
33 // Token: 0x06002187 RID: 8583 RVA: 0x0004C320 File Offset: 0x0004A520
34 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
36 {
37 return this.handle;
38 }
39
40 // Token: 0x1700045A RID: 1114
41 // (get) Token: 0x06002188 RID: 8584 RVA: 0x0004C334 File Offset: 0x0004A534
42 public bool IsClosed
43 {
44 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
45 get
46 {
47 /*
48An exception occurred when decompiling this method (06002188)
49
50ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Runtime.InteropServices.SafeHandle::get_IsClosed()
51
52 ---> System.Exception: Basic block has to end with unconditional control flow.
53{
54 Block_0:
55 stloc:int32(var_0_06, ldfld:int32(SafeHandle::_state, ldloc:SafeHandle(this)))
56}
57
58 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
59 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
60 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
61 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
62 --- End of inner exception stack trace ---
63 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
64 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
65*/;
66 }
67 }
68
69 // Token: 0x1700045B RID: 1115
70 // (get) Token: 0x06002189 RID: 8585
71 public abstract bool IsInvalid
72 {
73 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
74 get;
75 }
76
77 // Token: 0x0600218A RID: 8586 RVA: 0x0004C348 File Offset: 0x0004A548
78 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
79 public void Close()
80 {
81 }
82
83 // Token: 0x0600218B RID: 8587 RVA: 0x0004C358 File Offset: 0x0004A558
84 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
85 public void Dispose()
86 {
87 }
88
89 // Token: 0x0600218C RID: 8588 RVA: 0x0004C368 File Offset: 0x0004A568
90 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
91 protected virtual void Dispose(bool disposing)
92 {
93 this.InternalDispose();
94 }
95
96 // Token: 0x0600218D RID: 8589
97 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
98 protected abstract bool ReleaseHandle();
99
100 // Token: 0x0600218E RID: 8590 RVA: 0x0004C38C File Offset: 0x0004A58C
101 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
102 public void SetHandleAsInvalid()
103 {
104 if (!true)
105 {
106 }
107 GC.SuppressFinalize(this);
108 }
109
110 // Token: 0x0600218F RID: 8591 RVA: 0x0004C3A4 File Offset: 0x0004A5A4
111 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
112 public void DangerousAddRef(bool success)
113 {
114 if (this._fullyInitialized)
115 {
116 int state = this._state;
117 return;
118 }
119 }
120
121 // Token: 0x06002190 RID: 8592 RVA: 0x0004C3C4 File Offset: 0x0004A5C4
122 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
123 public void DangerousRelease()
124 {
125 long num = 0L;
126 this.DangerousReleaseInternal(num != 0L);
127 }
128
129 // Token: 0x06002191 RID: 8593 RVA: 0x0004C3DC File Offset: 0x0004A5DC
130 private void InternalDispose()
131 {
132 bool fullyInitialized;
133 do
134 {
136 }
137 while (!fullyInitialized);
138 this.DangerousReleaseInternal(true);
139 if (!fullyInitialized)
140 {
141 }
142 GC.SuppressFinalize(this);
143 }
144
145 // Token: 0x06002192 RID: 8594 RVA: 0x0004C404 File Offset: 0x0004A604
146 private void InternalFinalize()
147 {
148 if (this._fullyInitialized)
149 {
150 this.DangerousReleaseInternal(true);
151 return;
152 }
153 }
154
155 // Token: 0x06002193 RID: 8595 RVA: 0x0004C424 File Offset: 0x0004A624
157 {
158 if (this._fullyInitialized)
159 {
160 int state = this._state;
161 return;
162 }
163 }
164
165 // Token: 0x0400127D RID: 4733
166 protected IntPtr handle;
167
168 // Token: 0x0400127E RID: 4734
169 private int _state;
170
171 // Token: 0x0400127F RID: 4735
172 private bool _ownsHandle;
173
174 // Token: 0x04001280 RID: 4736
175 private bool _fullyInitialized;
176
177 // Token: 0x04001281 RID: 4737
178 private const int RefCount_Mask = 2147483644;
179
180 // Token: 0x04001282 RID: 4738
181 private const int RefCount_One = 4;
182 }
183}
class f__AnonymousType0<< Count > j__TPar
static void SuppressFinalize(object obj)
Definition GC.cs:116
virtual void Dispose(bool disposing)
Definition SafeHandle.cs:91
SafeHandle(IntPtr invalidHandleValue, bool ownsHandle)
Definition SafeHandle.cs:12