git_bsmd/nsw/Source/bsmd.herberg.FormService/Program.cs

40 lines
957 B
C#

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
namespace bsmd.herberg.FormService
{
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 FormService()
};
if (Debugger.IsAttached)
{
// ((FormService)ServicesToRun[0]).Init(null);
((FormService)ServicesToRun[0]).DoOnce();
while (true) ;
}
else
{
ServiceBase.Run(ServicesToRun);
}
}
}
}