public SearchViewModel(IExceptionHandler exceptionHandler, IBrewListViewModel brewListViewModel, INavigationService navigationService) { m_exceptionHandler = exceptionHandler; m_brewListViewModel = brewListViewModel; m_navigationService = navigationService; SearchCommand = new Command <string>(async searchString => await Search(searchString)); }
public SignInViewModel(INavigationService navigationService, IAccountService accountService, ITokenService tokenService, IBrewListViewModel brewListViewModel) { RegistrationViewModel = new RegistrationViewModel(accountService, navigationService, this); m_navigationService = navigationService; m_accountService = accountService; m_tokenService = tokenService; m_brewListViewModel = brewListViewModel; SignInCommand = new AsyncCommand(SignIn, () => { if (AppSettings.IsDemo) { return(true); } return(!string.IsNullOrEmpty(Email) && !string.IsNullOrEmpty(Password)); }); ProviderSignInCommand = new AsyncCommand <string>(ProviderSignIn); }