예제 #1
0
        public static void RunAsService(this IWebHost host)
        {
            Log.i("SRV", "Starting as service..");
            EngineProcess process        = (EngineProcess)host.Services.GetService(typeof(EngineProcess));
            var           webHostService = new EngineWebHostService(host, process);

            ServiceBase.Run(webHostService);
            Log.i("SRV", "Service started.");
        }
예제 #2
0
        public static void RunAsApp(this IWebHost host)
        {
            Log.i("SRV", "Starting engine...");
            EngineProcess process = (EngineProcess)host.Services.GetService(typeof(EngineProcess));

            process.Start();
            Log.i("SRV", "Engine started..");
            Log.i("SRV", "Starting web host...");
            host.Run();
        }
예제 #3
0
 public ServiceController(EngineProcess process)
 {
     engine = process;
 }
예제 #4
0
 public EngineWebHostService(IWebHost host, EngineProcess process) : base(host)
 {
     this.process = process;
 }