protected virtual void OnLogoutCompleted(LogoutCompletedEventArgs e) { var handler = LogoutCompleted; if (handler != null) { handler(this, e); } }
/// <summary> /// Async handler called when a logout request has completed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ClientOnLogoutCompleted(object sender, LogoutCompletedEventArgs e) { // Clear the session id.. ApplicationState.Instance.Account.SessionId = string.Empty; // Restore the ui.. this.LoginEnabled = true; this.LoginErrorVisibility = Visibility.Collapsed; this.PleaseWaitLoginVisibility = Visibility.Collapsed; this.PleaseWaitLogoutVisibility = Visibility.Collapsed; }
private void WebserviceLogoutCompleted(object sender, LogoutCompletedEventArgs e) { var asyncRequestInfo = e.UserState as AsyncRequestInfo; if (asyncRequestInfo == null) { throw new NullReferenceException("asyncRequestInfo (LogoutCompleted)"); } if (e.Result) { WebserviceState = WebserviceWrapperState.Disconnected; } asyncRequestInfo.Callback(new WebserviceResult(asyncRequestInfo, e.Result)); }
void m_authService_LogoutCompleted(object sender, LogoutCompletedEventArgs e) { CPApplication.Current.Browser.LoadingSpin.Hide(); if (e.Error == null) { if (e.Result.Faults != null && e.Result.Faults.Count > 0) { throw new Exception(e.Result.Faults[0].ErrorDescription); } } else { throw e.Error; } Action callback = e.UserState as Action; if (callback != null) { callback(); } }