protected virtual void OnPing() { try { var handler = Ping; if (handler != null) handler(this, EventArgs.Empty); } catch (Exception e) { _logger.Error("Error executing OnPing event", e); } }