// See https://aka.ms/new-console-template for more information
|
using Yw.TopShelf;
|
using Topshelf;
|
|
//SZJT
|
HostFactory.Run(x =>
|
{
|
x.Service<Service>();
|
x.RunAsLocalSystem();
|
x.SetDescription("智慧泵站Core版运行分析程序(SZJT)");
|
x.SetDisplayName("IStation.Core.Server.Run.SZJT");
|
x.SetServiceName("IStation.Core.Server.Run.SZJT");
|
x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
|
x.StartAutomatically();
|
});
|
|
|
//SMI
|
//HostFactory.Run(x =>
|
//{
|
// x.Service<Service>();
|
// x.RunAsLocalSystem();
|
// x.SetDescription("智慧泵站Core版运行分析程序(SMI)");
|
// x.SetDisplayName("IStation.Core.Server.Run.SMI");
|
// x.SetServiceName("IStation.Core.Server.Run.SMI");
|
// x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
|
// x.StartAutomatically();
|
//});
|
|
|
//PHM
|
//HostFactory.Run(x =>
|
//{
|
// x.Service<Service>();
|
// x.RunAsLocalSystem();
|
// x.SetDescription("智慧泵站Core版运行分析程序(PHM)");
|
// x.SetDisplayName("IStation.Core.Server.Run.PHM");
|
// x.SetServiceName("IStation.Core.Server.Run.PHM");
|
// x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
|
// x.StartAutomatically();
|
//});
|