软测单独项目
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.
 
 
 
 
 
 

33 lines
938 B

using SmartCamp.TaskServer.Topshelf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Topshelf;
namespace SmartCamp.TaskServer
{
class Program
{
static void Main(string[] args)
{
//注册log4net
string path = System.AppDomain.CurrentDomain.BaseDirectory + "log4net.config";
//Utility.Log4net.LogManager.InitLog4Net(path);
HostFactory.Run(x =>
{
x.Service<ServiceRunner>();
x.SetServiceName(ServiceConfig.Default.ServiceName);
x.SetDisplayName(ServiceConfig.Default.ServiceDisplayName);
x.SetDescription(ServiceConfig.Default.ServiceDescription);
x.RunAsLocalSystem();
x.EnablePauseAndContinue();
x.EnableShutdown();
});
}
}
}