Просматривал исходники. Не пропущен ли return методе TypeHelper.GetElementType?
public static Type GetElementType(Type type)
{
if (type == null)
return null;
if (type == typeof(object))
return type.HasElementType ? type.GetElementType(): null;
if (type.IsArray)
/* return ??? */ type.GetElementType();
if (type.IsGenericType)
foreach (var aType in type.GetGenericArguments())
if (typeof(IEnumerable<>).MakeGenericType(new[] { aType }).IsAssignableFrom(type))
return aType;
var interfaces = type.GetInterfaces();
if (interfaces != null && interfaces.Length > 0)
{
foreach (var iType in interfaces)
{
var eType = GetElementType(iType);
if (eType != null)
return eType;
}
}
return GetElementType(type.BaseType);
}