private void FilterGenericTypes(List types, SimpleTypeReference node)
{
bool genericRequested = (node is GenericTypeReference || node is GenericTypeDefinitionReference);
for (int i = 0; i < types.Count; i++)
{
IType type = types[i] as IType;
if (type == null) continue;
// Remove type from list of matches if it doesn't match requested generity
if (type.GenericInfo != null ^ genericRequested)
{
types.RemoveAt(i);
i--;
}
}
}