Umbraco now installs and can install the starter kit... not much else though ;)

This commit is contained in:
Shannon
2015-12-21 15:02:21 +01:00
parent 6593f4eaaa
commit fbf93e2059
5 changed files with 20 additions and 61 deletions

View File

@@ -314,6 +314,15 @@ namespace Umbraco.Web
{
base.ConfigureCoreServices(container);
container.EnablePerWebRequestScope();
container.Register<IUmbracoContextAccessor, DefaultUmbracoContextAccessor>(new PerContainerLifetime());
//TODO: Is this lifespan correct? Need to ask Stephen because we have contextual ones too
container.Register<IPublishedContentCache, PublishedContentCache>(new PerContainerLifetime());
container.Register<IPublishedMediaCache, PublishedMediaCache>(new PerContainerLifetime());
//no need to declare as per request, currently we manage it's lifetime as the singleton
container.Register<UmbracoContext>(factory => UmbracoContext.Current);
//Replace services:
container.Register<IEventMessagesFactory, RequestLifespanMessagesFactory>();
}
@@ -328,18 +337,9 @@ namespace Umbraco.Web
//IoC setup for LightInject for mvc/webapi
Container.EnableMvc();
Container.RegisterMvcControllers(PluginManager);
container.EnablePerWebRequestScope();
Container.RegisterMvcControllers(PluginManager);
container.EnableWebApi(GlobalConfiguration.Configuration);
container.RegisterApiControllers(PluginManager);
//register other services
container.Register<IUmbracoContextAccessor, DefaultUmbracoContextAccessor>(new PerRequestLifeTime());
//TODO: Is this lifespan correct? Need to ask Stephen because we have contextual ones too
container.Register<IPublishedContentCache, PublishedContentCache>(new PerContainerLifetime());
container.Register<IPublishedMediaCache, PublishedMediaCache>(new PerContainerLifetime());
//no need to declare as per request, currently we manage it's lifetime as the singleton
container.Register<UmbracoContext>(factory => UmbracoContext.Current);
}
/// <summary>