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

◆ EnsureType()

object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType ( JsonReader reader,
object value,
CultureInfo culture,
JsonContract contract,
Type targetType )
inlineprivate

Definition at line 472 of file JsonSerializerInternalReader.cs.

473 {
474 while (targetType != null)
475 {
477 if (value != null)
478 {
479 if (!contract.IsConvertable)
480 {
481 break;
482 }
483 if (contract.IsEnum)
484 {
485 if (value != null)
486 {
487 }
488 object obj = Enum.ToObject(contract.NonNullableUnderlyingType, value);
489 return obj;
490 }
491 Type nonNullableUnderlyingType = contract.NonNullableUnderlyingType;
492 object obj2;
493 return obj2;
494 }
495 else if (contract.IsNullable)
496 {
497 object obj;
498 return obj;
499 }
500 }
501 object obj3;
502 return obj3;
503 }
class f__AnonymousType0<< Count > j__TPar
static object ToObject(Type enumType, object value)
Definition Enum.cs:337

References Newtonsoft.Json.Utilities.ReflectionUtils.GetObjectType(), j__TPar, System.obj, System.Enum.ToObject(), and System.value.