예제 #1
0
        protected override void OnStart(string[] args)
        {
            if (DatabaseHelpers.TestConnection())
            {
                log.Debug("Connection to database is successful, starting service");
                thread = new Thread(Invoke);
                thread.IsBackground = true;
                thread.Start();
            }

            else
            {
                log.Fatal("Connection to database failed");
                this.ExitCode = 8409;
            }
        }