Skip to content

Commit af890ba

Browse files
committed
Revert "Moving expressions completely out of the core library for iOS"
This reverts commit bc2ece1.
1 parent bc2ece1 commit af890ba

File tree

8 files changed

+3
-87
lines changed

8 files changed

+3
-87
lines changed

src/AutoMapper/AutoMapper.Android.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
<Compile Include="Mappers\NameValueCollectionMapper.cs" />
5757
<Compile Include="Mappers\PlatformSpecificMapperRegistryOverride.cs" />
5858
<Compile Include="Mappers\TypeConverterMapper.cs" />
59-
<Compile Include="QueryableExtensions.cs" />
6059
<Compile Include="Resources\Resource.Designer.cs" />
6160
</ItemGroup>
6261
<ItemGroup>

src/AutoMapper/AutoMapper.Net4.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<Compile Include="Mappers\NameValueCollectionMapper.cs" />
6262
<Compile Include="Mappers\TypeConverterMapper.cs" />
6363
<Compile Include="Properties\AssemblyInfo.cs" />
64-
<Compile Include="QueryableExtensions.cs" />
6564
</ItemGroup>
6665
<ItemGroup>
6766
<ProjectReference Include="..\AutoMapper\AutoMapper.csproj">

src/AutoMapper/AutoMapper.SL5.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
<Compile Include="Mappers\PlatformSpecificMapperRegistryOverride.cs" />
7070
<Compile Include="Mappers\TypeConverterMapper.cs" />
7171
<Compile Include="Properties\AssemblyInfo.cs" />
72-
<Compile Include="QueryableExtensions.cs" />
7372
</ItemGroup>
7473
<ItemGroup>
7574
<ProjectReference Include="AutoMapper.csproj">

src/AutoMapper/AutoMapper.WP8.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
<Compile Include="Mappers\PlatformSpecificMapperRegistryOverride.cs" />
5353
<Compile Include="Mappers\TypeConverterMapper.cs" />
5454
<Compile Include="Properties\AssemblyInfo.cs" />
55-
<Compile Include="QueryableExtensions.cs" />
5655
</ItemGroup>
5756
<ItemGroup>
5857
<ProjectReference Include="AutoMapper.csproj">

src/AutoMapper/AutoMapper.WPA81.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<Compile Include="Mappers\HashSetMapper.cs" />
9999
<Compile Include="Mappers\PlatformSpecificMapperRegistryOverride.cs" />
100100
<Compile Include="Properties\AssemblyInfo.cs" />
101-
<Compile Include="QueryableExtensions.cs" />
102101
</ItemGroup>
103102
<ItemGroup>
104103
<None Include="..\AutoMapper.snk">

src/AutoMapper/AutoMapper.WinRT.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
<Compile Include="Mappers\HashSetMapper.cs" />
111111
<Compile Include="Mappers\PlatformSpecificMapperRegistryOverride.cs" />
112112
<Compile Include="Properties\AssemblyInfo.cs" />
113-
<Compile Include="QueryableExtensions.cs" />
114113
</ItemGroup>
115114
<ItemGroup>
116115
<ProjectReference Include="AutoMapper.csproj">

src/AutoMapper/AutoMapper.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
<Compile Include="PropertyMap.cs" />
146146
<Compile Include="Internal\ReflectionHelper.cs" />
147147
<Compile Include="Internal\ProxyBase.cs" />
148+
<Compile Include="QueryableExtensions.cs" />
148149
<Compile Include="ResolutionContext.cs" />
149150
<Compile Include="Internal\ResolutionExpression.cs" />
150151
<Compile Include="ResolutionResult.cs" />

src/AutoMapper/QueryableExtensions.cs

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)