welsonjs/WelsonJS.Toolkit/WelsonJS.Service/Program.cs

32 lines
786 B
C#
Raw Normal View History

2024-07-22 07:04:40 +00:00
using System;
using System.Collections.Generic;
2024-07-22 07:04:40 +00:00
using System.ServiceProcess;
using System.Text;
2024-07-22 07:04:40 +00:00
namespace WelsonJS.Service
{
internal static class Program
{
/// <summary>
/// 해당 애플리케이션의 주 진입점입니다.
2024-07-22 07:04:40 +00:00
/// </summary>
2024-07-22 11:15:31 +00:00
static void Main(string[] args)
2024-07-22 07:04:40 +00:00
{
2024-07-22 11:15:31 +00:00
if (Environment.UserInteractive)
2024-07-22 07:04:40 +00:00
{
ServiceMain svc = new ServiceMain(args);
svc.TestStartupAndStop();
2024-07-22 11:15:31 +00:00
}
else
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new ServiceMain(args)
2024-07-22 11:15:31 +00:00
};
ServiceBase.Run(ServicesToRun);
}
2024-07-22 07:04:40 +00:00
}
}
}