Exemple #1
0
        public static void LoadViewEngine()
        {
            var viewEngineTypes = ApplicationAssemblyLoader.TypesOf(typeof(IViewEngine));

            foreach (var viewEngineType in viewEngineTypes)
            {
                var viewEngine = (IViewEngine)Activator.CreateInstance(viewEngineType);
                viewEngineCache.Add(viewEngine.ExtensionName, viewEngine);
            }
        }
Exemple #2
0
        public void LoadRuntimeFileSystem(string path)
        {
            var providerTypes = ApplicationAssemblyLoader.TypesOf(typeof(IActionRuntimeProvider));

            foreach (var ptype in providerTypes)
            {
                RuntimeProviders.Add((IActionRuntimeProvider)Activator.CreateInstance(ptype));
            }

            foreach (var runtime in RuntimeProviders)
            {
                runtime.LoadRuntime(path);
                foreach (string controllerName in runtime.GetControllerNames())
                {
                    ca.Add(controllerName, runtime);
                }
            }
        }