天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.0 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Topshelf;
using QM.Exchange.Core;
namespace QM.ServiceHost
{
/// <summary>
/// 服务中心命令行宿主
/// </summary>
class Program
{
static void Main(string[] args)
{
//配置日志处理组件
QMFrameWork.Log.LogManager.Configure("log4net");
System.ServiceModel.ServiceHost _loginServiceHost = new System.ServiceModel.ServiceHost(typeof(LoginService));
//启动
HostFactory.Run(x =>
{
x.RunAsLocalSystem();
x.SetDescription(Configuration.ServiceDescription);
x.SetDisplayName(Configuration.ServiceDisplayName);
x.SetServiceName(Configuration.ServiceName);
x.Service(factory =>
{
ManagerServer server = new ManagerServer();
return server;
});
});
}
}
}