38 lines
820 B
C#
38 lines
820 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.ServiceProcess;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Threading;
|
|
using Torch;
|
|
using Torch.API;
|
|
|
|
namespace Torch.Server
|
|
{
|
|
public static class Program
|
|
{
|
|
private static ITorchServer _server;
|
|
|
|
public static void Main(string[] args)
|
|
{
|
|
if (!Environment.UserInteractive)
|
|
{
|
|
using (var service = new TorchService())
|
|
{
|
|
ServiceBase.Run(service);
|
|
}
|
|
return;
|
|
}
|
|
|
|
_server = new TorchServer();
|
|
_server.Init();
|
|
_server.Start();
|
|
}
|
|
}
|
|
}
|