Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the SampleTenant class
        /// </summary>
        public SampleTenant()
        {
            // setup view engine
            ViewEngine = DetermineViewEngine();

            // setup dependency container
            DependencyContainer = AssemblySettings.FormContainer(config => config.For <IApplicationTenant>().Singleton().Use(this));

            ApplicationName  = "Sample 2";
            MinifyJavaScript = true;
            MinifyCSS        = true;
            EnabledFeatures  = null;
            UrlPaths         = new[] { "http://localhost:3455/" };
        }
        private void precompileInstaller1_DescribeBatch(object sender, Spark.Web.Mvc.Install.DescribeBatchEventArgs e)
        {
            // Add controllers from assemblies.
            // NOTE: This will change to reflect the override model.

            /*foreach (var viewSetting in AssemblySettings.AssemblyViewPaths)
             *  e.Batch.FromAssembly(viewSetting.Item1);*/


            foreach (var controller in AssemblySettings.FormContainer().GetAllInstances <IController>())
            {
                e.Batch.For(controller.GetType());
            }
        }