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
Lease.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x0200035F RID: 863
9 internal class Lease : MarshalByRefObject, ILease
10 {
11 // Token: 0x06001CB9 RID: 7353 RVA: 0x0003E8CC File Offset: 0x0003CACC
12 public Lease()
13 {
15 if (!true)
16 {
17 }
18 if (!true)
19 {
20 }
22 if (!true)
23 {
24 }
26 if (!true)
27 {
28 }
30 if (!true)
31 {
32 }
35 DateTime dateTime = utcNow + initialLeaseTime;
36 this._leaseExpireTime = dateTime;
37 }
38
39 // Token: 0x17000355 RID: 853
40 // (get) Token: 0x06001CBA RID: 7354 RVA: 0x0003E928 File Offset: 0x0003CB28
42 {
43 get
44 {
46 if (!true)
47 {
48 }
51 return 1;
52 }
53 }
54
55 // Token: 0x17000356 RID: 854
56 // (get) Token: 0x06001CBB RID: 7355 RVA: 0x0003E950 File Offset: 0x0003CB50
58 {
59 get
60 {
61 return this._currentState;
62 }
63 }
64
65 // Token: 0x06001CBC RID: 7356 RVA: 0x0003E964 File Offset: 0x0003CB64
66 public void Activate()
67 {
69 }
70
71 // Token: 0x17000357 RID: 855
72 // (get) Token: 0x06001CBD RID: 7357 RVA: 0x0003E978 File Offset: 0x0003CB78
74 {
75 get
76 {
79 return timeSpan;
80 }
81 }
82
83 // Token: 0x06001CBE RID: 7358 RVA: 0x0003E990 File Offset: 0x0003CB90
85 {
86 if (!true)
87 {
88 }
91 bool flag = dateTime > leaseExpireTime;
92 this._leaseExpireTime = dateTime;
94 return 1;
95 }
96
97 // Token: 0x06001CBF RID: 7359 RVA: 0x0003E9D0 File Offset: 0x0003CBD0
98 public void Unregister(ISponsor obj)
99 {
100 if (this._sponsors != null)
101 {
104 return;
105 }
106 long num = 0L;
107 Monitor.Exit(this);
108 if (num == 0L)
109 {
110 return;
111 }
112 throw new OutOfMemoryException();
113 }
114
115 // Token: 0x06001CC0 RID: 7360 RVA: 0x0003EA30 File Offset: 0x0003CC30
116 internal void UpdateState()
117 {
118 LeaseState currentState = this._currentState;
120 if (this._sponsors != null)
121 {
123 Monitor.Enter(this, true);
125 long num = 0L;
126 Monitor.Exit(this);
127 if (num != 0L)
128 {
129 throw new OutOfMemoryException();
130 }
131 if (5 == 0)
132 {
133 this.CheckNextSponsor();
134 return;
135 }
136 }
137 else
138 {
140 }
141 }
142
143 // Token: 0x06001CC1 RID: 7361 RVA: 0x0003EAB0 File Offset: 0x0003CCB0
144 private void CheckNextSponsor()
145 {
146 if (this._renewingSponsors != null)
147 {
149 if (renewingSponsors != null)
150 {
151 if (renewingSponsors == null)
152 {
153 throw new InvalidCastException();
154 }
155 }
156 return;
157 }
158 int num = 4;
160 }
161
162 // Token: 0x06001CC2 RID: 7362 RVA: 0x0003EAF8 File Offset: 0x0003CCF8
163 private void ProcessSponsorResponse(object state, bool timedOut)
164 {
165 if (state != null && state == null)
166 {
167 throw new InvalidCastException();
168 }
169 int num = 2;
171 }
172
173 // Token: 0x04000E8B RID: 3723
175
176 // Token: 0x04000E8C RID: 3724
178
179 // Token: 0x04000E8D RID: 3725
181
182 // Token: 0x04000E8E RID: 3726
184
185 // Token: 0x04000E8F RID: 3727
187
188 // Token: 0x04000E90 RID: 3728
190
191 // Token: 0x04000E91 RID: 3729
193
194 // Token: 0x04000E92 RID: 3730
196
197 // Token: 0x02000360 RID: 864
198 private sealed class RenewalDelegate : MulticastDelegate
199 {
200 // Token: 0x06001CC3 RID: 7363 RVA: 0x0003EB3C File Offset: 0x0003CD3C
201 public RenewalDelegate(object @object, IntPtr method)
202 {
204 this.m_target = @object;
206 this.method_code = this;
207 }
208
209 // Token: 0x06001CC4 RID: 7364 RVA: 0x0003EB9C File Offset: 0x0003CD9C
211 {
212 /*
213An exception occurred when decompiling this method (06001CC4)
214
215ICSharpCode.Decompiler.DecompilerException: Error decompiling System.TimeSpan System.Runtime.Remoting.Lifetime.Lease/RenewalDelegate::Invoke(System.Runtime.Remoting.Lifetime.ILease)
216
217 ---> System.Exception: Basic block has to end with unconditional control flow.
218{
219 Block_0:
220 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:RenewalDelegate[exp:Delegate](this)))
221 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:RenewalDelegate[exp:Delegate](this)))
222 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:RenewalDelegate[exp:Delegate](this)))
223}
224
225 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
226 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
227 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
228 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
229 --- End of inner exception stack trace ---
230 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
231 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
232*/;
233 }
234
235 // Token: 0x06001CC5 RID: 7365 RVA: 0x0000207A File Offset: 0x0000027A
236 public IAsyncResult BeginInvoke(ILease lease, AsyncCallback callback, object @object)
237 {
238 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
239 }
240
241 // Token: 0x06001CC6 RID: 7366 RVA: 0x0003EBC0 File Offset: 0x0003CDC0
243 {
245 return timeSpan;
246 }
247 }
248 }
249}
class f__AnonymousType0<< Count > j__TPar
RenewalDelegate(object @object, IntPtr method)
Definition Lease.cs:201
IAsyncResult BeginInvoke(ILease lease, AsyncCallback callback, object @object)
Definition Lease.cs:236
TimeSpan Renew(TimeSpan renewalTime)
Definition Lease.cs:84
void Unregister(ISponsor obj)
Definition Lease.cs:98
void ProcessSponsorResponse(object state, bool timedOut)
Definition Lease.cs:163
Lease.RenewalDelegate _renewalDelegate
Definition Lease.cs:195
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static DateTime UtcNow
Definition DateTime.cs:1318