Removing unused TypeHelper method
This commit is contained in:
parent
648f00c03d
commit
a591e53dc9
|
|
@ -91,24 +91,5 @@ namespace Microsoft.AspNet.Mvc
|
||||||
{
|
{
|
||||||
return !type.GetTypeInfo().IsValueType || IsNullableValueType(type);
|
return !type.GetTypeInfo().IsValueType || IsNullableValueType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TypeInfo ExtractGenericInterface([NotNull] Type queryType, Type interfaceType)
|
|
||||||
{
|
|
||||||
Func<TypeInfo, bool> matchesInterface =
|
|
||||||
typeInfo => typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == interfaceType;
|
|
||||||
var queryTypeInfo = queryType.GetTypeInfo();
|
|
||||||
|
|
||||||
if (matchesInterface(queryTypeInfo))
|
|
||||||
{
|
|
||||||
return queryTypeInfo;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return queryTypeInfo
|
|
||||||
.ImplementedInterfaces
|
|
||||||
.Select(type => type.GetTypeInfo())
|
|
||||||
.FirstOrDefault(matchesInterface);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue