/// <summary> /// Returns all types that derive or have a base type of a this type. /// </summary> public static Type[] All(this HUMType.Data.Get derived, bool includeSelf = false) { List <Type> result = new List <Type>(); Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); for (int assembly = 0; assembly < assemblies.Length; assembly++) { Type[] types = assemblies[assembly].GetTypes(); for (int type = 0; type < types.Length; type++) { if (derived.type.IsAssignableFrom(types[type])) { result.Add(types[type]); } } } if (includeSelf) { result.Add(derived.type); } return(result.ToArray()); }
/// <summary> /// Continues the get operation by getting types of some kind. /// </summary> public static HUMType.Data.Types Types(this HUMType.Data.Get get) { return(new HUMType.Data.Types(get)); }