/// <summary> /// /// </summary> /// <param name="port"></param> public override void Start(int port) { try { mRealProcess = new RealDataServerProcess() { Parent = this }; mRealProcess.Init(); mInfoProcess = new TagInfoServerProcess() { Parent = this }; mHisProcess = new HisDataServerProcess() { Parent = this }; mRealProcess.Start(); mInfoProcess.Start(); mHisProcess.Start(); mIsStarted = true; //LoggerService.Service.Info("Spider Driver", "Start Sucessfull!"); } catch (Exception ex) { LoggerService.Service.Erro("Spider Driver", ex.Message); } base.Start(port); }
///// <summary> ///// ///// </summary> ///// <param name="port"></param> //protected override void StartInner(int port) //{ // try // { // mRealProcess = new RealDataServerProcess() { Parent = this }; // mRealProcess.Init(); // mInfoProcess = new TagInfoServerProcess() { Parent = this }; // mHisProcess = new HisDataServerProcess() { Parent = this }; // mRealProcess.Start(); // mInfoProcess.Start(); // mHisProcess.Start(); // mIsStarted = true; // LoggerService.Service.Info("Spider Driver", "Start Sucessfull!"); // } // catch(Exception ex) // { // LoggerService.Service.Erro("Spider Driver", ex.Message); // } // base.StartInner(port); //} /// <summary> /// /// </summary> public override void Stop() { base.Stop(); if (mRealProcess != null) { mRealProcess.Stop(); mRealProcess.Dispose(); mRealProcess = null; } if (mInfoProcess != null) { mInfoProcess.Stop(); mInfoProcess.Dispose(); mInfoProcess = null; } if (mHisProcess != null) { mHisProcess.Stop(); mHisProcess.Dispose(); mHisProcess = null; } }