internal JsonContract(Type underlyingType)
{
ValidationUtils.ArgumentNotNull(underlyingType, nameof(underlyingType));
UnderlyingType = underlyingType;
IsNullable = ReflectionUtils.IsNullable(underlyingType);
NonNullableUnderlyingType = (IsNullable && ReflectionUtils.IsNullableType(underlyingType)) ? Nullable.GetUnderlyingType(underlyingType) : underlyingType;
CreatedType = NonNullableUnderlyingType;
IsConvertable = ConvertUtils.IsConvertible(NonNullableUnderlyingType);
IsEnum = NonNullableUnderlyingType.IsEnum();
InternalReadType = ReadType.Read;
}