protected override void OnStop() { if (_timer != null) { _timer.Stop(); } ProcessDigitalOrders.InsertLog(string.Format("\n All Services Stopped At : {0}", DateTime.Now)); }
private void _timer_Elapsed(object sender, ElapsedEventArgs e) { try { if (!_IsDoingSomething) { _IsDoingSomething = true; ProcessDigitalOrders.ProcessOrder(); _IsDoingSomething = false; } } catch (Exception ex) { _IsDoingSomething = false; ProcessDigitalOrders.InsertLog(string.Format("\n\nError : {0}\n\t{1}", ex.Message, ex.StackTrace)); } }
private void InitFirstTrigger() { _IsDoingSomething = true; ProcessDigitalOrders.ProcessOrder(); _IsDoingSomething = false; }