markus / MarkusLogview / SignalREngineServiceWindowsService / Program.cs @ master
이력 | 보기 | 이력해설 | 다운로드 (1.16 KB)
1 | 84578b97 | djkim | using System; |
---|---|---|---|
2 | using System.Diagnostics; |
||
3 | using System.Reflection; |
||
4 | using System.ServiceProcess; |
||
5 | using System.Threading.Tasks; |
||
6 | using MarkusDataModel.Common; |
||
7 | using MarkusDataModel.DataModel; |
||
8 | using Microsoft.AspNet.SignalR.Client; |
||
9 | using ServiceInterface; |
||
10 | using SignalREngine; |
||
11 | using SignalREngineServiceWindowsService.HubConfig; |
||
12 | using TableDependency; |
||
13 | using TableDependency.EventArgs; |
||
14 | using TableDependency.SqlClient; |
||
15 | |||
16 | namespace SignalREngineServiceWindowsService |
||
17 | { |
||
18 | static class Program |
||
19 | { |
||
20 | |||
21 | private static ServiceEventLogger _serviceEventLogger = new ServiceEventLogger(); |
||
22 | |||
23 | /// <summary> |
||
24 | /// The main entry point for the application. |
||
25 | /// </summary> |
||
26 | static void Main(string[] args) |
||
27 | { |
||
28 | // Remove this if you want to test as a console application and add an arg |
||
29 | ServiceBase.Run(new SignalREngineServiceWindowsService()); |
||
30 | |||
31 | if (args != null) |
||
32 | { |
||
33 | try |
||
34 | { |
||
35 | |||
36 | Startup.StartServer(); |
||
37 | } |
||
38 | finally |
||
39 | { |
||
40 | Startup.StopServer(); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | |||
45 | } |
||
46 | |||
47 | } |