public override void Configure(Container container) { // We need to add all types in test project as potential arguments // as most don't follow the naming convention by ending with 'Args' foreach (var type in GetType().Assembly.GetTypes()) { Arguments.Add(type); } ViewEngines.Clear(); }
public static void Initialise(JessicaSettings settings = null) { Settings = settings ?? ConfigurationManager.GetSection("jessica") as JessicaSettings; RouteTable.Routes.Clear(); ViewEngines.Clear(); var modules = new List <Type>(); var engines = new List <Type>(); LoadJessicaAssemblies(); AppDomain.CurrentDomain.GetAssemblies().ForEach(asm => { modules.AddRange(asm.GetTypes().Where(type => type.BaseType == typeof(JessModule))); engines.AddRange(asm.GetTypes().Where(type => typeof(IViewEngine).IsAssignableFrom(type)).Where(type => !type.IsInterface)); }); RegisterRoutes(modules); RegisterViewEngines(engines); }