Plugin system working, Windows service and command system in progress

This commit is contained in:
John Gross
2017-01-05 02:49:43 -08:00
parent e0a4ee9ce0
commit 4949982fa8
24 changed files with 352 additions and 132 deletions

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceProcess;
using NLog;
using Torch.API;
namespace Torch.Server
@@ -11,7 +12,8 @@ namespace Torch.Server
class TorchService : ServiceBase
{
public const string Name = "Torch (SEDS)";
private readonly ITorchServer _server = new TorchServer();
private readonly TorchServer _server = new TorchServer();
private static Logger _log = LogManager.GetLogger("Torch");
public TorchService()
{
@@ -29,7 +31,9 @@ namespace Torch.Server
{
base.OnStart(args);
_server.Init();
_server.Start();
_server.RunArgs = args;
_server.IsService = true;
Task.Run(() => _server.Start());
}
/// <inheritdoc />