protected void Loop() { while (!StopRequested) { try { methodToRunInLoop(); } catch (Exception e) { _logger.Error("Exception reached top level.", e); } } if (Stopped != null) { Stopped(this, null); } }