35 lines
926 B
C#
35 lines
926 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.ServiceProcess;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM_MQ_Consumer_Service
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// Главная точка входа для приложения.
|
|
/// </summary>
|
|
static void Main(string[] args)
|
|
{
|
|
//Для отладки сервиса
|
|
if (Environment.UserInteractive)
|
|
{
|
|
HRMConsumerService service = new HRMConsumerService();
|
|
service.TestStatupAndStop(args);
|
|
}
|
|
else
|
|
{
|
|
ServiceBase[] ServicesToRun;
|
|
ServicesToRun = new ServiceBase[]
|
|
{
|
|
new HRMConsumerService()
|
|
};
|
|
ServiceBase.Run(ServicesToRun);
|
|
}
|
|
}
|
|
}
|
|
}
|