private void Session_ErrorOccured(object sender, ExceptionEventArgs e) { var handler = ErrorOccurred; if (handler != null) { handler(this, e); } }