Removing unused TypeHelper method

This commit is contained in:
Pranav K 2015-05-11 06:08:01 -07:00
parent 648f00c03d
commit a591e53dc9
1 changed files with 0 additions and 19 deletions

View File

@ -91,24 +91,5 @@ namespace Microsoft.AspNet.Mvc
{
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);
}
}
}
}