private static void TestEnumerableListPatterns(TypeModel model, BasicList candidates, Type iType)
{
#if WINRT
TypeInfo iTypeInfo = iType.GetTypeInfo();
if (iTypeInfo.IsGenericType)
{
Type typeDef = iTypeInfo.GetGenericTypeDefinition();
if (typeDef == typeof(System.Collections.Generic.ICollection <>) || typeDef.GetTypeInfo().FullName == "System.Collections.Concurrent.IProducerConsumerCollection`1")
{
Type[] iTypeArgs = iTypeInfo.GenericTypeArguments;
if (!candidates.Contains(iTypeArgs[0]))
{
candidates.Add(iTypeArgs[0]);
}
}
}
#elif !NO_GENERICS
if (iType.IsGenericType)
{
Type typeDef = iType.GetGenericTypeDefinition();
if (typeDef == model.MapType(typeof(System.Collections.Generic.IEnumerable <>)) ||
typeDef == model.MapType(typeof(System.Collections.Generic.ICollection <>)) ||
typeDef.FullName == "System.Collections.Concurrent.IProducerConsumerCollection`1")
{
Type[] iTypeArgs = iType.GetGenericArguments();
if (!candidates.Contains(iTypeArgs[0]))
{
candidates.Add(iTypeArgs[0]);
}
}
}
#endif
}