public Collection4 ForInterface(IReflectClass claxx) { Collection4 col = new Collection4(); ClassMetadataIterator i = Iterator(); while (i.MoveNext()) { ClassMetadata clazz = i.CurrentClass(); IReflectClass candidate = clazz.ClassReflector(); if (!candidate.IsInterface()) { if (claxx.IsAssignableFrom(candidate)) { col.Add(clazz); IEnumerator j = new Collection4(col).GetEnumerator(); while (j.MoveNext()) { ClassMetadata existing = (ClassMetadata)j.Current; if (existing != clazz) { ClassMetadata higher = clazz.GetHigherHierarchy(existing); if (higher != null) { if (higher == clazz) { col.Remove(existing); } else { col.Remove(clazz); } } } } } } } return(col); }