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

37 lines
1.0 KiB
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
{
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...");
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
}
}
}