private static void AddInterfaces(List<Type> list, Type type) { type.CheckBaked(); foreach (Type iface in type.__GetDeclaredInterfaces()) { if (!list.Contains(iface)) { list.Add(iface); AddInterfaces(list, iface); } } }