@@ -131,8 +131,8 @@ private static List<MemberBinding> CreateMemberBindings(IMappingEngine mappingEn
131131 }
132132 else if ( result . Type != propertyMap . DestinationPropertyType &&
133133 // avoid nullable etc.
134- propertyMap . DestinationPropertyType . GetBaseType ( ) != typeof ( ValueType ) &&
135- propertyMap . DestinationPropertyType . GetBaseType ( ) != typeof ( Enum ) )
134+ propertyMap . DestinationPropertyType . BaseType != typeof ( ValueType ) &&
135+ propertyMap . DestinationPropertyType . BaseType != typeof ( Enum ) )
136136 {
137137 bindExpression = BindMappedTypeExpression ( mappingEngine , propertyMap , result , destinationMember , typePairCount ) ;
138138 }
@@ -388,83 +388,4 @@ public IQueryable<TResult> To<TResult>()
388388 return _source . Select ( expr ) ;
389389 }
390390 }
391-
392- #if NETFX_CORE
393- internal static class ExtensionMethods
394- {
395- public static PropertyInfo GetProperty ( this Type type , String propertyName )
396- {
397- return type . GetTypeInfo ( ) . GetDeclaredProperty ( propertyName ) ;
398- }
399-
400- public static MethodInfo GetMethod ( this Type type , String methodName )
401- {
402- return type . GetTypeInfo ( ) . GetDeclaredMethod ( methodName ) ;
403- }
404-
405- public static bool IsSubclassOf ( this Type type , Type parentType )
406- {
407- return type . GetTypeInfo ( ) . IsSubclassOf ( parentType ) ;
408- }
409-
410- public static bool IsAssignableFrom ( this Type type , Type parentType )
411- {
412- return type . GetTypeInfo ( ) . IsAssignableFrom ( parentType . GetTypeInfo ( ) ) ;
413- }
414-
415- public static bool IsEnum ( this Type type )
416- {
417- return type . GetTypeInfo ( ) . IsEnum ;
418- }
419-
420- public static bool IsPrimitive ( this Type type )
421- {
422- return type . GetTypeInfo ( ) . IsPrimitive ;
423- }
424-
425- public static Type GetBaseType ( this Type type )
426- {
427- return type . GetTypeInfo ( ) . BaseType ;
428- }
429-
430- public static bool IsGenericType ( this Type type )
431- {
432- return type . GetTypeInfo ( ) . IsGenericType ;
433- }
434-
435- public static Type [ ] GetGenericArguments ( this Type type )
436- {
437- return type . GetTypeInfo ( ) . GenericTypeArguments ;
438- }
439-
440- public static object GetPropertyValue ( this Object instance , string propertyValue )
441- {
442- return instance . GetType ( ) . GetTypeInfo ( ) . GetDeclaredProperty ( propertyValue ) . GetValue ( instance ) ;
443- }
444-
445- public static TypeInfo GetTypeInfo ( this Type type )
446- {
447- IReflectableType reflectableType = ( IReflectableType ) type ;
448- return reflectableType . GetTypeInfo ( ) ;
449- }
450-
451- public static IEnumerable < MemberInfo > GetMember ( this Type type , string name )
452- {
453- return type . GetTypeInfo ( ) . DeclaredMembers . Where ( m => m . Name == name ) ;
454- }
455-
456- public static IEnumerable < Type > GetInterfaces ( this Type type )
457- {
458- return type . GetTypeInfo ( ) . ImplementedInterfaces ;
459- }
460- }
461- #else
462- internal static class ExtensionMethods
463- {
464- public static Type GetBaseType ( this Type type )
465- {
466- return type . BaseType ;
467- }
468- }
469- #endif
470391}
0 commit comments