Esempio n. 1
0
        protected override void OnStart(string[] args)
        {
            try
            {
                var connectionStringHelper = new ConnectionStringHelper();
                var connectionString       = connectionStringHelper.Get(PHmiConstants.PHmiConnectionStringName);
                connectionStringHelper.Protect();
                var connectionParameters = new NpgConnectionParameters();
                connectionParameters.Update(connectionString);

                _runner = _runnerFactory.Create(connectionParameters.Database, connectionString);
                _runner.Start();
            }
            catch (Exception exception)
            {
                _reporter.Report(Res.StartError, exception);
            }
        }
Esempio n. 2
0
        protected override void OnStart(string[] args)
        {
            try
            {
                var connectionStringHelper = new ConnectionStringHelper();
                var connectionString = connectionStringHelper.Get(PHmiConstants.PHmiConnectionStringName);
                connectionStringHelper.Protect();
                var connectionParameters = new NpgConnectionParameters();
                connectionParameters.Update(connectionString);

                _runner = _runnerFactory.Create(connectionParameters.Database, connectionString);
                _runner.Start();
            }
            catch (Exception exception)
            {
                _reporter.Report(Res.StartError, exception);
            }
        }
Esempio n. 3
0
 private void StartRunner()
 {
     _runner.Start();
     Busy = false;
 }