public AccountViewModel() { CheckLogin(); MessagingCenter.Subscribe <LoginViewModel>(this, "CheckLogin", (sender) => CheckLogin()); MessagingCenter.Subscribe <RegisterViewModel>(this, "CheckLogin", (sender) => CheckLogin()); MessagingCenter.Subscribe <EditAccountViewModel>(this, "UpdateAccount", (sender) => LoadUserCommand.Execute(null)); }
public async Task <CommandResult> Load([FromServices] LoadUserCommand _loadUserCommand, string siteId, string siteUserId) { var userInput = new UserInput <LoadUserInput> { UserId = User.GetUserId(), Data = new LoadUserInput { SiteId = siteId, SiteUserId = siteUserId } }; var result = await Business .InvokeAsync <LoadUserCommand, UserInput <LoadUserInput>, CommandResult <dynamic> >(_loadUserCommand, userInput).ConfigureAwait(false); return(result); }