private void ProxyWebSession_RequestException(object sender, WebExceptionEventArgs e) { if (e.Exception.GetTroubleshootingID() == WebExceptionTroubleshootingID.ServiceUnavailable) { this.isAlive = false; } }
/// <summary> /// Raises the <see cref="IServiceClient.ExceptionReceived"/> event. /// </summary> /// <param name="args"> The event arguments. </param> protected virtual void OnExceptionReceived(WebExceptionEventArgs args) { var evt = ExceptionReceived; if (evt != null) { evt(this, args); } }