Example #1
0
        public LsbLinuxHostInstaller(LinuxServiceSettings settings, Installer[] installers, LinuxServiceLogWriter logWriter)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            _settings   = settings;
            _installers = installers;
            _logWriter  = logWriter;

            _installTransaction = new TransactionManager <LinuxServiceSettings>(_logWriter)
                                  .Stage(Properties.Resources.CreateServiceFileStage, CreateServiceFile, DeleteServiceFile)
                                  .Stage(Properties.Resources.SetServiceFileAsExecutableStage, SetServiceFileAsExecutable)
                                  .Stage(Properties.Resources.RegisterServiceFileStage, RegisterServiceFile, UnregisterServiceFile);
        }
        public LsbLinuxHostInstaller(LinuxServiceSettings settings, Installer[] installers, LinuxServiceLogWriter logWriter)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            _settings = settings;
            _installers = installers;
            _logWriter = logWriter;

            _installTransaction = new TransactionManager<LinuxServiceSettings>(_logWriter)
                .Stage(Properties.Resources.CreateServiceFileStage, CreateServiceFile, DeleteServiceFile)
                .Stage(Properties.Resources.SetServiceFileAsExecutableStage, SetServiceFileAsExecutable)
                .Stage(Properties.Resources.RegisterServiceFileStage, RegisterServiceFile, UnregisterServiceFile);
        }
 public TransactionManager(LinuxServiceLogWriter logWriter)
 {
     _logWriter = logWriter;
     _stages    = new List <StageInfo>();
 }