30 lines
710 B
C#
30 lines
710 B
C#
using System.Diagnostics;
|
|
using System.ServiceProcess;
|
|
|
|
namespace bsmd.ReportGenerator
|
|
{
|
|
static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
static void Main()
|
|
{
|
|
ServiceBase[] ServicesToRun;
|
|
|
|
log4net.Config.XmlConfigurator.Configure();
|
|
|
|
ServicesToRun = new ServiceBase[] { new ReportService() };
|
|
|
|
if (Debugger.IsAttached)
|
|
{
|
|
((ReportService)ServicesToRun[0]).DoOnce();
|
|
}
|
|
else
|
|
{
|
|
ServiceBase.Run(ServicesToRun);
|
|
}
|
|
}
|
|
}
|
|
}
|