public GeneratedPackagesService(IModeDeploimentService modeDeploimentService,
                                 IBackupFile backupFile,
                                 IConsoleService consoleService,
                                 IUpdateFileService updateFileService,
                                 ICmdCordovaService cmdCordovaService,
                                 IConfigurationService configurationService,
                                 ISelectPathDirectoryService selectPathDirectoryService,
                                 IEventAggregator eventAggregator,
                                 ILoggerService loggerService)
 {
     _modeDeploimentService      = modeDeploimentService;
     _backupFile                 = backupFile;
     _consoleService             = consoleService;
     _updateFileService          = updateFileService;
     _cmdCordovaService          = cmdCordovaService;
     _configurationService       = configurationService;
     _selectPathDirectoryService = selectPathDirectoryService;
     _eventAggregator            = eventAggregator;
     _loggerService              = loggerService;
     _config = _configurationService.GetConfig();
     if (!_eventAggregator.GetEvent <CmdIsFinishEvent>().Contains(OnFinishRecevied))
     {
         _eventAggregator.GetEvent <CmdIsFinishEvent>().Subscribe(OnFinishRecevied, false);
     }
 }
Ejemplo n.º 2
0
 public MainWindowViewModel(
     IConfigurationService configuationService,
     IConsoleService consoleService,
     IEventAggregator eventAggregator,
     ISelectPathDirectoryService selectPathDirectoryService,
     IGeneratedPackageService generatedPackageService,
     IControleInputService controleInputService)
 {
     _configurationService       = configuationService;
     _consoleService             = consoleService;
     _eventAggregator            = eventAggregator;
     _selectPathDirectoryService = selectPathDirectoryService;
     _generatedPackageService    = generatedPackageService;
     _controleInputService       = controleInputService;
     Config             = _configurationService.GetConfig();
     PathDirectory      = "Chemin de la solution";
     PathFinalDirectory = "Chemin de destination des packages générés";
     FilesFind          = false;
     Tpaths             = new string[] { Config.PATH_CONFIG_XML, Config.PATH_CONFIG_CONSTANT_JS, Config.PATH_NEXWORD_MODULE_JS };
     if (!_eventAggregator.GetEvent <MessageEvent>().Contains(OnMessageRecevied))
     {
         _eventAggregator.GetEvent <MessageEvent>().Subscribe(OnMessageRecevied, false);
     }
     if (!_eventAggregator.GetEvent <ClearConsoleEvent>().Contains(OnClearConsole))
     {
         _eventAggregator.GetEvent <ClearConsoleEvent>().Subscribe(OnClearConsole, false);
     }
     if (!_eventAggregator.GetEvent <PathFindEvent>().Contains(OnFileFind))
     {
         _eventAggregator.GetEvent <PathFindEvent>().Subscribe(OnFileFind, false);
     }
     if (!_eventAggregator.GetEvent <IsBuildableEvent>().Contains(OnBusyable))
     {
         _eventAggregator.GetEvent <IsBuildableEvent>().Subscribe(OnBusyable, false);
     }
 }