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
HandleCollector.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Threading
;
3
4
namespace
System.Runtime.InteropServices
5
{
6
// Token: 0x020000A3 RID: 163
7
public
sealed
class
HandleCollector
8
{
9
// Token: 0x060002DA RID: 730 RVA: 0x0000AD9C File Offset: 0x00008F9C
10
public
HandleCollector
(
string
name
,
int
initialThreshold
)
11
{
12
}
13
14
// Token: 0x060002DB RID: 731 RVA: 0x0000ADAC File Offset: 0x00008FAC
15
public
HandleCollector
(
string
name
,
int
initialThreshold
,
int
maximumThreshold
)
16
{
17
if
(
name
!=
null
)
18
{
19
this.name
=
name
;
20
return
;
21
}
22
this.initialThreshold
=
initialThreshold
;
23
this.threshold
=
maximumThreshold
;
24
this.threshold
=
initialThreshold
;
25
}
26
27
// Token: 0x17000099 RID: 153
28
// (get) Token: 0x060002DC RID: 732 RVA: 0x0000AE04 File Offset: 0x00009004
29
public
int
Count
30
{
31
get
32
{
33
return
this.
handleCount
;
34
}
35
}
36
37
// Token: 0x1700009A RID: 154
38
// (get) Token: 0x060002DD RID: 733 RVA: 0x0000AE18 File Offset: 0x00009018
39
public
int
InitialThreshold
40
{
41
get
42
{
43
return
this.
initialThreshold
;
44
}
45
}
46
47
// Token: 0x1700009B RID: 155
48
// (get) Token: 0x060002DE RID: 734 RVA: 0x0000AE2C File Offset: 0x0000902C
49
public
int
MaximumThreshold
50
{
51
get
52
{
53
return
this.
maximumThreshold
;
54
}
55
}
56
57
// Token: 0x1700009C RID: 156
58
// (get) Token: 0x060002DF RID: 735 RVA: 0x0000AE40 File Offset: 0x00009040
59
public
string
Name
60
{
61
get
62
{
63
return
this.
name
;
64
}
65
}
66
67
// Token: 0x060002E0 RID: 736 RVA: 0x0000AE54 File Offset: 0x00009054
68
public
void
Add
()
69
{
70
long
num = 0
L
;
71
int
num2
=
Interlocked
.
Increment
(
int
.MinValue);
72
int
num3
= this.
handleCount
;
73
int
num4
= this.
threshold
;
74
Monitor
.
Enter
(
this
, num != 0
L
);
75
int
num5
= 26215;
76
int
num6
= this.
gc_gen
;
77
long
num7
= 0
L
;
78
this.threshold
=
num3
;
79
this.gc_gen
=
num3
;
80
int
num8
= 5;
81
if
(num3 != 0)
82
{
83
Monitor
.
Exit
(
this
);
84
}
85
if
(
num7
== 0
L
)
86
{
87
if
(
num8
== 0)
88
{
89
int
[]
array
;
90
if
(
num6
!= 0)
91
{
92
array
= this.
gc_counts
;
93
if
(num5 == 0)
94
{
95
}
96
int
num9
=
GC
.
CollectionCount
(
num6
);
97
}
98
if
(
array
==
null
)
99
{
100
}
101
GC
.
Collect
(
num6
);
102
Thread
.
Sleep
(
num6
);
103
int
[]
array2
= this.
gc_counts
;
104
if
(array ==
null
)
105
{
106
}
107
int
num10
=
GC
.
CollectionCount
(
int
.MinValue);
108
array2.m_value
=
num10
;
109
}
110
return
;
111
}
112
throw
new
OutOfMemoryException
();
113
}
114
115
// Token: 0x060002E1 RID: 737 RVA: 0x0000AF34 File Offset: 0x00009134
116
public
void
Remove
()
117
{
118
long
num = 0
L
;
119
int
num2
=
Interlocked
.
Decrement
(
int
.MinValue);
120
int
num3
= this.
handleCount
;
121
Monitor
.
Enter
(
this
, num != 0
L
);
122
int
num4
= this.
initialThreshold
;
123
long
num5
= 0
L
;
124
this.threshold
=
num4
;
125
int
num6
= 5;
126
if
(num4 != 0)
127
{
128
Monitor
.
Exit
(
this
);
129
}
130
if
(
num5
== 0
L
)
131
{
132
if
(
num6
== 0)
133
{
134
int
[]
array
= this.
gc_counts
;
135
if
(num4 == 0)
136
{
137
}
138
int
num7
=
GC
.
CollectionCount
(
int
.MinValue);
139
array.m_value
=
num7
;
140
}
141
return
;
142
}
143
throw
new
OutOfMemoryException
();
144
}
145
146
// Token: 0x04000278 RID: 632
147
private
const
int
deltaPercent
= 10;
148
149
// Token: 0x04000279 RID: 633
150
private
string
name
;
151
152
// Token: 0x0400027A RID: 634
153
private
int
initialThreshold
;
154
155
// Token: 0x0400027B RID: 635
156
private
int
maximumThreshold
;
157
158
// Token: 0x0400027C RID: 636
159
private
int
threshold
;
160
161
// Token: 0x0400027D RID: 637
162
private
int
handleCount
;
163
164
// Token: 0x0400027E RID: 638
165
private
int
[]
gc_counts
;
166
167
// Token: 0x0400027F RID: 639
168
private
int
gc_gen
;
169
}
170
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
System.GC.CollectionCount
static int CollectionCount(int generation)
Definition
GC.cs:79
System.GC.Collect
static void Collect(int generation)
Definition
GC.cs:46
System.GC
Definition
GC.cs:11
System.OutOfMemoryException
Definition
OutOfMemoryException.cs:9
System.Runtime.InteropServices.HandleCollector.InitialThreshold
int InitialThreshold
Definition
HandleCollector.cs:40
System.Runtime.InteropServices.HandleCollector.maximumThreshold
int maximumThreshold
Definition
HandleCollector.cs:156
System.Runtime.InteropServices.HandleCollector.MaximumThreshold
int MaximumThreshold
Definition
HandleCollector.cs:50
System.Runtime.InteropServices.HandleCollector.Name
string Name
Definition
HandleCollector.cs:60
System.Runtime.InteropServices.HandleCollector.HandleCollector
HandleCollector(string name, int initialThreshold, int maximumThreshold)
Definition
HandleCollector.cs:15
System.Runtime.InteropServices.HandleCollector.Add
void Add()
Definition
HandleCollector.cs:68
System.Runtime.InteropServices.HandleCollector.HandleCollector
HandleCollector(string name, int initialThreshold)
Definition
HandleCollector.cs:10
System.Runtime.InteropServices.HandleCollector.gc_gen
int gc_gen
Definition
HandleCollector.cs:168
System.Runtime.InteropServices.HandleCollector.name
string name
Definition
HandleCollector.cs:150
System.Runtime.InteropServices.HandleCollector.gc_counts
int[] gc_counts
Definition
HandleCollector.cs:165
System.Runtime.InteropServices.HandleCollector.handleCount
int handleCount
Definition
HandleCollector.cs:162
System.Runtime.InteropServices.HandleCollector.deltaPercent
const int deltaPercent
Definition
HandleCollector.cs:147
System.Runtime.InteropServices.HandleCollector.initialThreshold
int initialThreshold
Definition
HandleCollector.cs:153
System.Runtime.InteropServices.HandleCollector.Remove
void Remove()
Definition
HandleCollector.cs:116
System.Runtime.InteropServices.HandleCollector.Count
int Count
Definition
HandleCollector.cs:30
System.Runtime.InteropServices.HandleCollector.threshold
int threshold
Definition
HandleCollector.cs:159
System.Runtime.InteropServices.HandleCollector
Definition
HandleCollector.cs:8
System.Threading.Interlocked.Increment
static int Increment(int location)
Definition
Interlocked.cs:54
System.Threading.Interlocked.Decrement
static int Decrement(int location)
Definition
Interlocked.cs:47
System.Threading.Interlocked
Definition
Interlocked.cs:11
System.Threading.Monitor.Exit
static void Exit(object obj)
Definition
Monitor.cs:47
System.Threading.Monitor.Enter
static void Enter(object obj)
Definition
Monitor.cs:11
System.Threading.Monitor
Definition
Monitor.cs:9
System.Threading.Thread.Sleep
static void Sleep(int millisecondsTimeout)
Definition
Thread.cs:207
System.Threading.Thread
Definition
Thread.cs:15
System.Runtime.InteropServices
Definition
_Activator.cs:4
System.Threading
Definition
_ThreadPoolWaitCallback.cs:4
System.ExceptionArgument.array
@ array
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
source
System
Runtime
InteropServices
HandleCollector.cs
Generated by
1.10.0