private static void InstallDefaultRules(ValidatingVisitor visitor) { foreach (Type t in AssemblyTypeCache.GetTypes(Assembly.GetExecutingAssembly())) { if (!t.IsAbstract && typeof(IRuleSet).IsAssignableFrom(t) && t.Namespace == typeof(IRuleSet).Namespace) { IRuleSet ruleSet = (IRuleSet)Activator.CreateInstance(t); ruleSet.Install(visitor); } } }