2024-07-22 07:04:40 +00:00
|
|
|
|
using System;
|
2024-07-29 06:41:10 +00:00
|
|
|
|
using System.Collections.Generic;
|
2024-07-22 07:04:40 +00:00
|
|
|
|
using System.ServiceProcess;
|
2024-07-29 06:41:10 +00:00
|
|
|
|
using System.Text;
|
2024-07-22 07:04:40 +00:00
|
|
|
|
|
|
|
|
|
namespace WelsonJS.Service
|
|
|
|
|
{
|
|
|
|
|
internal static class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-07-29 06:41:10 +00:00
|
|
|
|
/// 해당 애플리케이션의 주 진입점입니다.
|
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
|
|
|
|
{
|
2024-07-29 12:43:14 +00:00
|
|
|
|
Console.WriteLine("WelsonJS Service Application (User Interactive Mode)");
|
|
|
|
|
Console.WriteLine("https://github.com/gnh1201/welsonjs");
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
Console.WriteLine("Service is running...");
|
|
|
|
|
|
2024-07-29 07:06:04 +00:00
|
|
|
|
ServiceMain svc = new ServiceMain(args);
|
|
|
|
|
svc.TestStartupAndStop();
|
2024-07-22 11:15:31 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ServiceBase[] ServicesToRun;
|
|
|
|
|
ServicesToRun = new ServiceBase[]
|
|
|
|
|
{
|
2024-07-29 07:06:04 +00:00
|
|
|
|
new ServiceMain(args)
|
2024-07-22 11:15:31 +00:00
|
|
|
|
};
|
|
|
|
|
ServiceBase.Run(ServicesToRun);
|
|
|
|
|
}
|
2024-07-22 07:04:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|