36 lines
864 B
C#
36 lines
864 B
C#
using System.Diagnostics;
|
|
using System.ServiceProcess;
|
|
using System.Threading;
|
|
|
|
namespace bsmd.AIS2Service
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
static void Main()
|
|
{
|
|
log4net.Config.XmlConfigurator.Configure();
|
|
|
|
if (Debugger.IsAttached)
|
|
{
|
|
AISManager.Start();
|
|
// TODO wait some
|
|
Thread.Sleep(180000);
|
|
// Test finish..
|
|
AISManager.Stop();
|
|
}
|
|
else
|
|
{
|
|
ServiceBase[] ServicesToRun;
|
|
ServicesToRun = new ServiceBase[]
|
|
{
|
|
new AIS2_Service()
|
|
};
|
|
ServiceBase.Run(ServicesToRun);
|
|
}
|
|
}
|
|
}
|
|
}
|