Shuxia Ning
2024-08-07 554694000f4d7ffc231a23e7ff429595c254ceaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// See https://aka.ms/new-console-template for more information
using IStation.TopShelf;
using Topshelf;
 
 
HostFactory.Run(x =>
{
    x.Service<Service>();
    x.RunAsLocalSystem();
    x.SetDescription("陈行场内模型在线验证(义维)");
    x.SetDisplayName("IStation.Server.Validation");
    x.SetServiceName("IStation.Server.Validation");
    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(1)));
    x.StartAutomatically();
});