public void AddType <T>() where T : class { var types = ReflectionUtility.GetAllDerivedTypesOfType <T>(); foreach (var type in types) { if (_ignoreClassTypes.Any(x => type.IsSubclassOf(x) || type == x)) { continue; } if (_ignoreAttributeTypes.Any(x => type.GetCustomAttributes(x, true).Length > 0)) { continue; } Types.Add(type); } }