U4-7577 Remove dependency on UmbracoContext in CreateServiceContext / RequestLifespanMessagesFactory

This commit is contained in:
Shannon
2016-02-16 15:07:42 +01:00
parent b550b3dde3
commit 6fffc8b45e
6 changed files with 41 additions and 9 deletions

View File

@@ -89,7 +89,7 @@ namespace Umbraco.Web
protected override ServiceContext CreateServiceContext(DatabaseContext dbContext, IDatabaseFactory dbFactory)
{
//use a request based messaging factory
var evtMsgs = new RequestLifespanMessagesFactory(new SingletonUmbracoContextAccessor());
var evtMsgs = new RequestLifespanMessagesFactory(new SingletonHttpContextAccessor());
return new ServiceContext(
new RepositoryFactory(ApplicationCache, ProfilingLogger.Logger, dbContext.SqlSyntax, UmbracoConfig.For.UmbracoSettings()),
new PetaPocoUnitOfWorkProvider(dbFactory),