using Microsoft.Extensions.DependencyInjection;
|
using Rhea.Common;
|
using Sundial;
|
using Autofac;
|
using System;
|
using System.ComponentModel;
|
using Tiger.IBusiness;
|
using Tiger.Model;
|
|
namespace Tiger.Business
|
{
|
/// <summary>
|
/// 服务总控
|
/// </summary>
|
public class ServicesBus : IServicesBus
|
{
|
|
#region Functions
|
public void StartServices(ISchedulerFactory schedulerFactory)
|
{
|
if (ApiConfig.RunInterface)
|
{
|
BizContext.InterfaceService = DI.Resolve<IInterfaceService>();
|
//BizContext.InterfaceService.SetSchedulerFactory(schedulerFactory);
|
////启动时从服务器加载所有作业
|
//BizContext.InterfaceService.AddJobFromDB();
|
|
//新版本计划调试初始化
|
BizContext.InterfaceService.JobInitialize();
|
|
ConsoleExt.WriteLine("Start Interface Service..........", ConsoleColor.Yellow);
|
}
|
}
|
|
public void StopServices()
|
{
|
////关闭客户端监控
|
//if (ApiConfig.RunMesInterface)
|
//{
|
// MesInterfaceService.Stop();
|
// ConsoleExt.WriteLine("Stop MES Interface Service..........", ConsoleColor.Yellow);
|
//}
|
//if (ApiConfig.RunSrmInterface)
|
//{
|
// SrmInterfaceService.Stop();
|
// ConsoleExt.WriteLine("Stop SRM Interface Service..........", ConsoleColor.Yellow);
|
//}
|
}
|
#endregion
|
}
|
}
|