IronPython.Runtime.Types.NewTypeInfo.GetPythonTypes C# (CSharp) Method

GetPythonTypes() private static method

Filters out old-classes and throws if any non-types are included, returning a yielding the remaining PythonType objects.
private static GetPythonTypes ( string typeName, ICollection bases ) : IEnumerable
typeName string
bases ICollection
return IEnumerable
        private static IEnumerable<PythonType> GetPythonTypes(string typeName, ICollection<object> bases) {
            foreach (object curBaseType in bases) {
                PythonType curBasePythonType = curBaseType as PythonType;
                if (curBasePythonType == null) {
                    if (curBaseType is OldClass)
                        continue;
                    throw PythonOps.TypeError(typeName + ": unsupported base type for new-style class " + curBaseType);
                }

                yield return curBasePythonType;
            }
        }