/// <summary> /// Fired when the user is updated /// </summary> private async void UserMan_OnUserUpdated(object sender, UserUpdatedArgs args) { await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { UpdateAccount(); }); }
/// <summary> /// Fired when the current user is updated. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void OnUserUpdated(object sender, UserUpdatedArgs args) { // If a user is added or removed update the subreddit to reflect the new user. if (args.Action != UserCallbackAction.Updated) { Update(true); } }
public void UpdateSuccess(object sender, UserUpdatedArgs e) { string identityId = _signInManager.UserManager.GetUserId(User); UserInformationDto = _userInformation.GetUserProfileInformationAsync(identityId).Result; EthnicityOptions = _ethnicityInformation.GetEthnicities().Select(x => new SelectListItem { Text = x.Name, Value = x.Id + "" }).ToList().Result; TempData[MessageKey] = "Update success!"; }
private void OnUserUpdated(object sender, UserUpdatedArgs e) { switch (e.Action) { // If the user is now signed in update. case UserCallbackAction.Added: Update(); break; case UserCallbackAction.Removed: // If the user is logged out clear out the message ui. UpdateMessageCounts(new List <Message>(), true); break; case UserCallbackAction.Updated: break; default: throw new ArgumentOutOfRangeException(); } }
protected virtual void OnUserUpdated(UserUpdatedArgs e) => UserUpdated?.Invoke(this, e);