using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
public static class Utils
{
public static List GetSubclassesOf(Type type, bool ignoreSystem)
{
List lReturn = new List();
foreach (var a in System.Threading.Thread.GetDomain().GetAssemblies())
{
if (ignoreSystem && a.FullName.StartsWith("System."))
{
continue;
}
foreach (var t in a.GetTypes())
{
if (t.IsSubclassOf(type) || (type.IsInterface && t.GetInterfaces().FirstOrDefault(e => e.FullName == type.FullName) != null))
{
lReturn.Add(t);
}
}
}
return lReturn;
}
}