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

◆ ConvertTo() [1/2]

override object System.ComponentModel.EnumConverter.ConvertTo ( ITypeDescriptorContext context,
CultureInfo culture,
object value,
Type destinationType )
inlinevirtual

Reimplemented from System.ComponentModel.TypeConverter.

Definition at line 103 of file EnumConverter.cs.

104 {
105 if (!true)
106 {
107 }
108 Type type;
109 bool flag = type == type;
110 if (value != null)
111 {
113 Type type2;
115 if (value != null)
116 {
117 bool flag2 = value.GetType() != underlyingType;
118 if (value == null)
119 {
120 throw new InvalidCastException();
121 }
122 if (value != null)
123 {
124 return value;
125 }
126 goto IL_012C;
127 }
128 else if ((type2 != null && type2 == null) || (fieldInfo != null && fieldInfo == null) || (value != null && value == null))
129 {
130 throw new ArrayTypeMismatchException();
131 }
132 }
133 else
134 {
136 Type type3;
137 bool flag3 = underlyingType == type3;
138 if (value != null)
139 {
140 Type type4 = this.type;
141 int num = 44;
142 string text;
143 int num2 = text.IndexOf((char)num);
145 if (value != null)
146 {
147 if (value == null)
148 {
149 goto IL_012C;
150 }
151 if (value != null)
152 {
153 return value;
154 }
155 throw new InvalidCastException();
156 }
157 }
158 }
159 Array array;
160 int length = array.Length;
161 int length2 = array.Length;
162 long num3 = 0L;
163 object value2 = array.GetValue((int)num3);
164 if (value2 == null)
165 {
166 return value2;
167 }
168 int length3 = array.Length;
169 int num4 = 1;
170 long num5;
171 while (num5 != 0L)
172 {
173 }
174 if (num4 == 0)
175 {
176 }
177 object obj;
178 if (obj != null)
179 {
180 }
181 return obj;
182 IL_012C:
183 throw new InvalidCastException();
184 }
class f__AnonymousType0<< Count > j__TPar
static Type GetUnderlyingType(Type enumType)
Definition Enum.cs:205

References System.array, System.Enum.GetUnderlyingType(), j__TPar, System.L, System.Array.Length, System.length, System.obj, System.text, System.ComponentModel.EnumConverter.type, and System.value.