public IEnumerable<EntityType> GetSubtypesOf(EntityType type, ItemCollection itemCollection, bool includeAbstractTypes)
{
if (type != null)
{
IEnumerable<EntityType> typesInCollection = itemCollection.GetItems<EntityType>();
foreach (EntityType typeInCollection in typesInCollection)
{
if (type.Equals(typeInCollection) == false && this.IsSubtypeOf(typeInCollection, type))
{
if (includeAbstractTypes || !typeInCollection.Abstract)
{
yield return typeInCollection;
}
}
}
}
}