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
WeakReference.2.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
using
System.Runtime.Serialization
;
4
5
namespace
System
6
{
7
// Token: 0x020001A5 RID: 421
8
[
Serializable
]
9
public
sealed
class
WeakReference
<T> :
ISerializable
where
T :
class
10
{
11
// Token: 0x06001004 RID: 4100 RVA: 0x00022228 File Offset: 0x00020428
12
public
WeakReference
(T target)
13
{
14
}
15
16
// Token: 0x06001005 RID: 4101 RVA: 0x00022238 File Offset: 0x00020438
17
public
WeakReference
(T target,
bool
trackResurrection
)
18
{
19
long
num = 0
L
;
20
base
..ctor();
21
this.trackResurrection
= num != 0
L
;
22
GCHandle
gchandle
;
23
this.handle
=
gchandle
;
24
}
25
26
// Token: 0x06001006 RID: 4102 RVA: 0x0002225C File Offset: 0x0002045C
27
private
WeakReference
(
SerializationInfo
info
,
StreamingContext
context)
28
{
29
do
30
{
31
base
..ctor();
32
}
33
while
(
info
==
null
);
34
bool
boolean
=
info
.GetBoolean(
"TrackResurrection"
);
35
this.trackResurrection
=
"TrackResurrection"
!=
null
;
36
Type
type;
37
object
value
=
info
.GetValue(
"TrackedObject"
, type);
38
bool
flag = this.
trackResurrection
;
39
GCHandle
gchandle
;
40
this.handle
=
gchandle
;
41
}
42
43
// Token: 0x06001007 RID: 4103 RVA: 0x000222A8 File Offset: 0x000204A8
44
public
void
GetObjectData
(
SerializationInfo
info
,
StreamingContext
context)
45
{
46
while
(
info
==
null
)
47
{
48
}
49
bool
flag = this.
trackResurrection
;
50
info.
AddValue
(
"TrackResurrection"
, flag);
51
object
obj
;
52
info
.AddValue(
"TrackedObject"
,
obj
);
53
}
54
55
// Token: 0x06001008 RID: 4104 RVA: 0x000222D8 File Offset: 0x000204D8
56
public
void
SetTarget
(T target)
57
{
58
}
59
60
// Token: 0x06001009 RID: 4105 RVA: 0x000222E8 File Offset: 0x000204E8
61
public
bool
TryGetTarget
([Out] T target)
62
{
63
object
obj
;
64
if
(
obj
!=
null
)
65
{
66
if
(
obj
==
null
)
67
{
68
throw
new
InvalidCastException
();
69
}
70
}
71
if
(
obj
==
null
||
obj
!=
null
)
72
{
73
}
74
throw
new
InvalidCastException
();
75
}
76
77
// Token: 0x0600100A RID: 4106 RVA: 0x00022310 File Offset: 0x00020510
78
protected
override
void
Finalize
()
79
{
80
base
.Finalize();
81
}
82
83
// Token: 0x040008AA RID: 2218
84
private
GCHandle
handle
;
85
86
// Token: 0x040008AB RID: 2219
87
private
bool
trackResurrection
;
88
}
89
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
System.InvalidCastException
Definition
InvalidCastException.cs:9
System.Runtime.Serialization.SerializationInfo.AddValue
void AddValue(string name, object value, Type type)
Definition
SerializationInfo.cs:178
System.Runtime.Serialization.SerializationInfo
Definition
SerializationInfo.cs:10
System.Type
Definition
Type.cs:12
System.WeakReference.WeakReference
WeakReference(SerializationInfo info, StreamingContext context)
Definition
WeakReference.2.cs:27
System.WeakReference.TryGetTarget
bool TryGetTarget([Out] T target)
Definition
WeakReference.2.cs:61
System.WeakReference.Finalize
override void Finalize()
Definition
WeakReference.2.cs:78
System.WeakReference.handle
GCHandle handle
Definition
WeakReference.2.cs:84
System.WeakReference.WeakReference
WeakReference(T target)
Definition
WeakReference.2.cs:12
System.WeakReference.trackResurrection
bool trackResurrection
Definition
WeakReference.2.cs:87
System.WeakReference.WeakReference
WeakReference(T target, bool trackResurrection)
Definition
WeakReference.2.cs:17
System.WeakReference.SetTarget
void SetTarget(T target)
Definition
WeakReference.2.cs:56
System.WeakReference.GetObjectData
void GetObjectData(SerializationInfo info, StreamingContext context)
Definition
WeakReference.2.cs:44
System.WeakReference
Definition
WeakReference.2.cs:10
System.Runtime.Serialization.ISerializable
Definition
ISerializable.cs:7
System.Reflection.TypeAttributes.Serializable
@ Serializable
System.Runtime.InteropServices
Definition
_Activator.cs:4
System.Runtime.Serialization
Definition
DeserializationEventHandler.cs:4
System.ExceptionArgument.value
@ value
System.ExceptionArgument.obj
@ obj
System.ExceptionArgument.info
@ info
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
System.Runtime.InteropServices.GCHandle
Definition
GCHandle.cs:9
System.Runtime.Serialization.StreamingContext
Definition
StreamingContext.cs:10
source
mscorlib
System
WeakReference.2.cs
Generated by
1.10.0