using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace SciServer.Logging.Listener
{
    partial class LogListenerService : ServiceBase
    {
        Thread thread;

        public LogListenerService()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            thread = new Thread(new ThreadStart(delegate { MessageProcessor.DoProcess(); }));
            thread.Start();
        }

        protected override void OnStop()
        {
            thread.Abort();
        }
    }
}
