From 9fdfb4f8e8b08b8d05347a10c2009dd4cc436225 Mon Sep 17 00:00:00 2001 From: Nick Craver Date: Sat, 14 Nov 2015 13:41:27 -0500 Subject: [PATCH] DNX: Use TypeInfo --- Dapper/TypeExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dapper/TypeExtensions.cs b/Dapper/TypeExtensions.cs index ff866c3..d4a54ff 100644 --- a/Dapper/TypeExtensions.cs +++ b/Dapper/TypeExtensions.cs @@ -9,7 +9,7 @@ internal static class TypeExtensions public static bool IsValueType(this Type type) { #if DNXCORE50 - return typeof(ValueType).IsAssignableFrom(type) && type != typeof(ValueType); + return type.GetTypeInfo().IsValueType; #else return type.IsValueType; #endif @@ -17,7 +17,7 @@ public static bool IsValueType(this Type type) public static bool IsEnum(this Type type) { #if DNXCORE50 - return typeof(Enum).IsAssignableFrom(type) && type != typeof(Enum); + return type.GetTypeInfo().IsEnum; #else return type.IsEnum; #endif -- GitLab