Beispiel #1
0
        static void OnStart(string[] args)
        {
            try
            {
                //初始化配置项字典
                ConfigHelper.Init(ConfigScope.GPSGatewayAlarmBusinessWS.ToString(), System.Configuration.ConfigurationSettings.AppSettings["CaseType"]);
                //string ip = "127.0.0.1"; // ConfigHelper.GetConfig("localip");
                //int port = int.Parse(ConfigHelper.GetConfig("localport"));

                server = new AlarmServer();
                server.Start();
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }
        }
Beispiel #2
0
        protected override void OnStart(string[] args)
        {
            try
            {
                //初始化配置项字典
                ConfigHelper.Init(ConfigScope.GPSGatewayAlarmBusinessWS.ToString(), ConfigurationSettings.AppSettings["CaseType"]);
                //string ip = this.GetLocalIPAddress();   // ConfigHelper.GetConfig("localip");
                //int port = int.Parse(ConfigHelper.GetConfig("localport"));

                server = new AlarmServer();
                server.Start();
            }
            catch (Exception ex)
            {
                Logger.Fatal(ex, null);
            }
        }