working on U4-5927 - this extends the base event class to have EventMessages which event consumers can add to, the trick is that there is a factory for these EventMessages, in a web context, the factory is a request based factory so that during a request all instances of the EventMessages are the same instance. All services then accept an instance of IEventMessagesFactory which they can then use when raising events. We'll then use this to send messages to the UI. Not sure if i should make this a resolver yet or not. Still a WIP!!

This commit is contained in:
Shannon
2015-07-23 20:04:40 +02:00
parent 445dff7c5e
commit a6a2b02cd8
45 changed files with 361 additions and 356 deletions

View File

@@ -18,26 +18,10 @@ namespace Umbraco.Core.Services
/// </summary>
public class LocalizationService : RepositoryService, ILocalizationService
{
[Obsolete("Use the constructors that specify all dependencies instead")]
public LocalizationService()
: this(new RepositoryFactory(ApplicationContext.Current.ApplicationCache, LoggerResolver.Current.Logger, SqlSyntaxContext.SqlSyntaxProvider, UmbracoConfig.For.UmbracoSettings()))
{ }
[Obsolete("Use the constructors that specify all dependencies instead")]
public LocalizationService(RepositoryFactory repositoryFactory)
: this(new PetaPocoUnitOfWorkProvider(LoggerResolver.Current.Logger), repositoryFactory, LoggerResolver.Current.Logger)
{
}
[Obsolete("Use the constructors that specify all dependencies instead")]
public LocalizationService(IDatabaseUnitOfWorkProvider provider)
: this(provider, new RepositoryFactory(ApplicationContext.Current.ApplicationCache, LoggerResolver.Current.Logger, SqlSyntaxContext.SqlSyntaxProvider, UmbracoConfig.For.UmbracoSettings()), LoggerResolver.Current.Logger)
{
}
public LocalizationService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger)
: base(provider, repositoryFactory, logger)
public LocalizationService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory)
: base(provider, repositoryFactory, logger, eventMessagesFactory)
{
}