Exemple #1
0
        private static IOrchardHost HostInitialization(HttpApplication application)
        {
            var host = OrchardStarter.CreateHost(MvcSingletons);

            host.Initialize();

            // initialize shells to speed up the first dynamic query
            host.BeginRequest();
            host.EndRequest();

            return(host);
        }
Exemple #2
0
        private static IOrchardHost HostInitialization(HttpApplication application)
        {
            // Initialize dependency injection using autofac with the current application
            var host = OrchardStarter.CreateHost(MvcSingletons);

            host.Initialize();

            // initialize shells to speed up the first dynamic query
            host.BeginRequest();
            host.EndRequest();

            return(host);
        }
        protected void Application_Start()
        {
            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
            RoleEnvironment.Changing += (sender, e) => {
                // If a configuration setting is changing
                if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
                {
                    // Set e.Cancel to true to restart this role instance
                    e.Cancel = true;
                }
            };

            RegisterRoutes(RouteTable.Routes);

            _host = OrchardStarter.CreateHost(MvcSingletons);
            _host.Initialize();
        }
Exemple #4
0
        public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            var host = OrchardStarter.CreateHost(app, loggerFactory);

            host.Initialize();
        }
Exemple #5
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerfactory)
        {
            var host = OrchardStarter.CreateHost(app);

            host.Initialize();
        }
Exemple #6
0
        public void Configure(IApplicationBuilder app)
        {
            var host = OrchardStarter.CreateHost(app);

            host.Initialize();
        }
        public void DefaultOrchardHostInstanceReturnedByCreateHost()
        {
            var host = OrchardStarter.CreateHost(b => b.RegisterInstance(new ControllerBuilder()));

            Assert.That(host, Is.TypeOf <DefaultOrchardHost>());
        }