Shuxia Ning
2024-07-17 fd681339c81201ed6fb3303647ecab89e3e6c0c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using IStation.Server;
using Topshelf;
 
namespace IStation.TopShelf
{
    /// <summary>
    /// 
    /// </summary>
    public class Service : ServiceControl
    {
        private readonly JobHelper _jobHelper = new();
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="hostControl"></param>
        /// <returns></returns>
        public bool Start(HostControl hostControl)
        {
            Yw.LogHelper.Info("启动:陈行场内模型在线验证服务");
            _jobHelper.StartJob();
            return true;
        }
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="hostControl"></param>
        /// <returns></returns>
        public bool Stop(HostControl hostControl)
        {
            Yw.LogHelper.Info("停止:陈行场内模型在线验证服务");
            _jobHelper.CancelJob();
            return true;
        }
 
    }
}