Ejemplo n.º 1
0
 public WindowsServiceManager(IWindowsServiceProviderFactory providerFactory, IRegistryEditor registryEditor, IFileManager fileManager, IConfigurationReader configurationReader)
 {
     _providerFactory     = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
     _registryEditor      = registryEditor ?? throw new ArgumentNullException(nameof(registryEditor));
     _fileManager         = fileManager ?? throw new ArgumentNullException(nameof(fileManager));
     _configurationReader = configurationReader ?? throw new ArgumentNullException(nameof(configurationReader));
 }
Ejemplo n.º 2
0
 public WindowsServiceManager(IWindowsServiceProviderFactory providerFactory, IRegistryEditor registryEditor, IFileManager fileManager, string[] windowsServices)
 {
     _providerFactory = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
     _registryEditor  = registryEditor ?? throw new ArgumentNullException(nameof(registryEditor));
     _fileManager     = fileManager ?? throw new ArgumentNullException(nameof(fileManager));
     _windowsServices = windowsServices ?? new string[0];
 }
Ejemplo n.º 3
0
 public WindowsServiceManager(IWindowsServiceProviderFactory providerFactory, IFilesHelper filesHelper, IWindowsServices serviceNames)
 {
     _providerFactory = providerFactory ?? throw new ArgumentNullException(nameof(providerFactory));
     _filesHelper     = filesHelper ?? throw new ArgumentNullException(nameof(filesHelper));
     _serviceNames    = serviceNames ?? throw new ArgumentNullException(nameof(serviceNames));
     if (!_serviceNames.Any())
     {
         throw new ArgumentNullException(nameof(serviceNames));
     }
 }