mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
split MessageAggregator in EventAggregator and CommandExecutor
This commit is contained in:
parent
909439f615
commit
64181ebdff
83 changed files with 296 additions and 233 deletions
|
@ -10,6 +10,7 @@ using NzbDrone.Common.EnvironmentInfo;
|
|||
using NzbDrone.Core.Configuration.Events;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Messaging;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
|
||||
namespace NzbDrone.Core.Configuration
|
||||
|
@ -33,15 +34,15 @@ namespace NzbDrone.Core.Configuration
|
|||
{
|
||||
private const string CONFIG_ELEMENT_NAME = "Config";
|
||||
|
||||
private readonly IMessageAggregator _messageAggregator;
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
private readonly ICached<string> _cache;
|
||||
|
||||
private readonly string _configFile;
|
||||
|
||||
public ConfigFileProvider(IAppFolderInfo appFolderInfo, ICacheManger cacheManger, IMessageAggregator messageAggregator)
|
||||
public ConfigFileProvider(IAppFolderInfo appFolderInfo, ICacheManger cacheManger, IEventAggregator eventAggregator)
|
||||
{
|
||||
_cache = cacheManger.GetCache<string>(GetType());
|
||||
_messageAggregator = messageAggregator;
|
||||
_eventAggregator = eventAggregator;
|
||||
_configFile = appFolderInfo.GetConfigPath();
|
||||
}
|
||||
|
||||
|
@ -82,7 +83,7 @@ namespace NzbDrone.Core.Configuration
|
|||
}
|
||||
}
|
||||
|
||||
_messageAggregator.PublishEvent(new ConfigFileSavedEvent());
|
||||
_eventAggregator.PublishEvent(new ConfigFileSavedEvent());
|
||||
}
|
||||
|
||||
public int Port
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue