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
JsonFormatterConverter.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Globalization
;
3
using
System.Runtime.Serialization
;
4
using
Cpp2IlInjected
;
5
using
Newtonsoft.Json.Shims
;
6
using
Newtonsoft.Json.Utilities
;
7
8
namespace
Newtonsoft.Json.Serialization
9
{
10
// Token: 0x02000081 RID: 129
11
[
Preserve
]
12
internal
class
JsonFormatterConverter
:
IFormatterConverter
13
{
14
// Token: 0x060004A7 RID: 1191 RVA: 0x0000C700 File Offset: 0x0000A900
15
public
JsonFormatterConverter
(
JsonSerializerInternalReader
reader,
JsonISerializableContract
contract
,
JsonProperty
member
)
16
{
17
ValidationUtils
.
ArgumentNotNull
(reader,
"reader"
);
18
ValidationUtils
.
ArgumentNotNull
(
contract
,
"contract"
);
19
this._reader
= reader;
20
this._contract
=
contract
;
21
this._member
=
member
;
22
}
23
24
// Token: 0x060004A8 RID: 1192 RVA: 0x0000C740 File Offset: 0x0000A940
25
private
T
GetTokenValue<T>
(
object
A_1
)
26
{
27
ValidationUtils
.
ArgumentNotNull
(
A_1
,
"value"
);
28
if
(
A_1
!=
null
)
29
{
30
}
31
CultureInfo
invariantCulture
=
CultureInfo
.
InvariantCulture
;
32
Type
type;
33
object
obj
= global::System.Convert.ChangeType(
A_1
, type,
invariantCulture
);
34
throw
new
InvalidCastException
();
35
}
36
37
// Token: 0x060004A9 RID: 1193 RVA: 0x0000C774 File Offset: 0x0000A974
38
public
object
Convert
(
object
value
,
Type
type)
39
{
40
do
41
{
42
ValidationUtils
.
ArgumentNotNull
(
value
,
"value"
);
43
}
44
while
(
value
==
null
);
45
JsonSerializerInternalReader
reader = this.
_reader
;
46
JsonISerializableContract
contract
= this.
_contract
;
47
JsonProperty
member
= this.
_member
;
48
object
obj
;
49
return
obj
;
50
}
51
52
// Token: 0x060004AA RID: 1194 RVA: 0x0000C7A8 File Offset: 0x0000A9A8
53
public
object
Convert
(
object
value
,
TypeCode
typeCode)
54
{
55
ValidationUtils
.
ArgumentNotNull
(
value
,
"value"
);
56
if
(
value
!=
null
)
57
{
58
}
59
CultureInfo
invariantCulture
=
CultureInfo
.
InvariantCulture
;
60
return
global::System.Convert.ChangeType(
value
, typeCode,
invariantCulture
);
61
}
62
63
// Token: 0x060004AB RID: 1195 RVA: 0x0000C7D4 File Offset: 0x0000A9D4
64
public
bool
ToBoolean
(
object
value
)
65
{
66
return
this.
GetTokenValue<bool>
(value);
67
}
68
69
// Token: 0x060004AC RID: 1196 RVA: 0x0000212A File Offset: 0x0000032A
70
public
byte
ToByte
(
object
value
)
71
{
72
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
73
}
74
75
// Token: 0x060004AD RID: 1197 RVA: 0x0000212A File Offset: 0x0000032A
76
public
char
ToChar
(
object
value
)
77
{
78
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
79
}
80
81
// Token: 0x060004AE RID: 1198 RVA: 0x0000C7E8 File Offset: 0x0000A9E8
82
public
DateTime
ToDateTime
(
object
value
)
83
{
84
return
1;
85
}
86
87
// Token: 0x060004AF RID: 1199 RVA: 0x0000C7F8 File Offset: 0x0000A9F8
88
public
decimal
ToDecimal
(
object
value
)
89
{
90
return
1;
91
}
92
93
// Token: 0x060004B0 RID: 1200 RVA: 0x0000212A File Offset: 0x0000032A
94
public
double
ToDouble
(
object
value
)
95
{
96
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
97
}
98
99
// Token: 0x060004B1 RID: 1201 RVA: 0x0000212A File Offset: 0x0000032A
100
public
short
ToInt16
(
object
value
)
101
{
102
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
103
}
104
105
// Token: 0x060004B2 RID: 1202 RVA: 0x0000212A File Offset: 0x0000032A
106
public
int
ToInt32
(
object
value
)
107
{
108
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
109
}
110
111
// Token: 0x060004B3 RID: 1203 RVA: 0x0000212A File Offset: 0x0000032A
112
public
long
ToInt64
(
object
value
)
113
{
114
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
115
}
116
117
// Token: 0x060004B4 RID: 1204 RVA: 0x0000212A File Offset: 0x0000032A
118
public
sbyte
ToSByte
(
object
value
)
119
{
120
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
121
}
122
123
// Token: 0x060004B5 RID: 1205 RVA: 0x0000212A File Offset: 0x0000032A
124
public
float
ToSingle
(
object
value
)
125
{
126
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
127
}
128
129
// Token: 0x060004B6 RID: 1206 RVA: 0x0000212A File Offset: 0x0000032A
130
public
string
ToString
(
object
value
)
131
{
132
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
133
}
134
135
// Token: 0x060004B7 RID: 1207 RVA: 0x0000212A File Offset: 0x0000032A
136
public
ushort
ToUInt16
(
object
value
)
137
{
138
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
139
}
140
141
// Token: 0x060004B8 RID: 1208 RVA: 0x0000212A File Offset: 0x0000032A
142
public
uint
ToUInt32
(
object
value
)
143
{
144
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
145
}
146
147
// Token: 0x060004B9 RID: 1209 RVA: 0x0000212A File Offset: 0x0000032A
148
public
ulong
ToUInt64
(
object
value
)
149
{
150
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
151
}
152
153
// Token: 0x0400021A RID: 538
154
private
readonly
JsonSerializerInternalReader
_reader
;
155
156
// Token: 0x0400021B RID: 539
157
private
readonly
JsonISerializableContract
_contract
;
158
159
// Token: 0x0400021C RID: 540
160
private
readonly
JsonProperty
_member
;
161
}
162
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Cpp2IlInjected.AnalysisFailedException
Definition
AnalysisFailedException.cs:7
Newtonsoft.Json.Serialization.JsonFormatterConverter.JsonFormatterConverter
JsonFormatterConverter(JsonSerializerInternalReader reader, JsonISerializableContract contract, JsonProperty member)
Definition
JsonFormatterConverter.cs:15
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToSByte
sbyte ToSByte(object value)
Definition
JsonFormatterConverter.cs:118
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToDateTime
DateTime ToDateTime(object value)
Definition
JsonFormatterConverter.cs:82
Newtonsoft.Json.Serialization.JsonFormatterConverter._reader
readonly JsonSerializerInternalReader _reader
Definition
JsonFormatterConverter.cs:154
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToUInt64
ulong ToUInt64(object value)
Definition
JsonFormatterConverter.cs:148
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToBoolean
bool ToBoolean(object value)
Definition
JsonFormatterConverter.cs:64
Newtonsoft.Json.Serialization.JsonFormatterConverter.Convert
object Convert(object value, TypeCode typeCode)
Definition
JsonFormatterConverter.cs:53
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToSingle
float ToSingle(object value)
Definition
JsonFormatterConverter.cs:124
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToInt16
short ToInt16(object value)
Definition
JsonFormatterConverter.cs:100
Newtonsoft.Json.Serialization.JsonFormatterConverter._member
readonly JsonProperty _member
Definition
JsonFormatterConverter.cs:160
Newtonsoft.Json.Serialization.JsonFormatterConverter._contract
readonly JsonISerializableContract _contract
Definition
JsonFormatterConverter.cs:157
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToInt64
long ToInt64(object value)
Definition
JsonFormatterConverter.cs:112
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToChar
char ToChar(object value)
Definition
JsonFormatterConverter.cs:76
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToDecimal
decimal ToDecimal(object value)
Definition
JsonFormatterConverter.cs:88
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToByte
byte ToByte(object value)
Definition
JsonFormatterConverter.cs:70
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToString
string ToString(object value)
Definition
JsonFormatterConverter.cs:130
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToDouble
double ToDouble(object value)
Definition
JsonFormatterConverter.cs:94
Newtonsoft.Json.Serialization.JsonFormatterConverter.GetTokenValue< T >
T GetTokenValue< T >(object A_1)
Definition
JsonFormatterConverter.cs:25
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToInt32
int ToInt32(object value)
Definition
JsonFormatterConverter.cs:106
Newtonsoft.Json.Serialization.JsonFormatterConverter.Convert
object Convert(object value, Type type)
Definition
JsonFormatterConverter.cs:38
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToUInt32
uint ToUInt32(object value)
Definition
JsonFormatterConverter.cs:142
Newtonsoft.Json.Serialization.JsonFormatterConverter.ToUInt16
ushort ToUInt16(object value)
Definition
JsonFormatterConverter.cs:136
Newtonsoft.Json.Serialization.JsonFormatterConverter
Definition
JsonFormatterConverter.cs:13
Newtonsoft.Json.Serialization.JsonISerializableContract
Definition
JsonISerializableContract.cs:10
Newtonsoft.Json.Serialization.JsonProperty
Definition
JsonProperty.cs:12
Newtonsoft.Json.Serialization.JsonSerializerInternalReader
Definition
JsonSerializerInternalReader.cs:18
Newtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull
static void ArgumentNotNull(object value, string parameterName)
Definition
ValidationUtils.cs:11
Newtonsoft.Json.Utilities.ValidationUtils
Definition
ValidationUtils.cs:9
System.Globalization.CultureInfo.InvariantCulture
static CultureInfo InvariantCulture
Definition
CultureInfo.cs:39
System.Globalization.CultureInfo
Definition
CultureInfo.cs:15
System.InvalidCastException
Definition
InvalidCastException.cs:9
System.Type
Definition
Type.cs:12
ulong
System.Runtime.Serialization.IFormatterConverter
Definition
IFormatterConverter.cs:8
Cpp2IlInjected
Definition
AnalysisFailedException.cs:4
Newtonsoft.Json.Serialization
Definition
CachedAttributeGetter.cs:7
Newtonsoft.Json.Shims
Definition
PreserveAttribute.cs:4
Newtonsoft.Json.Utilities
Definition
Base64Encoder.cs:6
System.Globalization
Definition
Bootstring.cs:5
System.Runtime.Serialization
Definition
DeserializationEventHandler.cs:4
System.Xml.Schema.XmlSchemaWhiteSpace.Preserve
@ Preserve
System.TypeCode
TypeCode
Definition
TypeCode.cs:7
System.ExceptionArgument.value
@ value
System.ExceptionArgument.obj
@ obj
System
Definition
__ComObject.cs:4
System.DateTime
Definition
DateTime.cs:13
source
Newtonsoft.Json
Serialization
JsonFormatterConverter.cs
Generated by
1.10.0