git_bsmd/nsw/Source/bsmd.EMailReceiveService/Program.cs
2015-04-23 06:02:43 +00:00

36 lines
851 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.EMailReceiveService
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new EmailReceiveService()
};
if (Debugger.IsAttached)
{
((EmailReceiveService)ServicesToRun[0]).Init(null);
while (true) ;
}
else
{
ServiceBase.Run(ServicesToRun);
}
}
}
}