public PasswordChangeViewModel(ICredentialService credentials, INavigationAdapter navigation, Logging logging) { this.credentials = credentials; this.navigation = navigation; log = logging.GetLoggerFor <PasswordChangeViewModel>(); ChangePasswordCommand = new Command( async() => await ChangePassword(), CanChangePassword); }
public AddUserViewModel(Logging logging, INavigationAdapter navigation, ICredentialService credential, IEnumerable <Duty> roles) { this.navigation = navigation; this.credential = credential; log = logging.GetLoggerFor <AddUserViewModel>(); Roles = new ObservableCollection <RoleSelectionViewModel>( roles.Select(r => new RoleSelectionViewModel(r.Name, r.DisplayName))); AddNewUserCommand = new Command(async() => await AddNewUser(), CanAddNewUser); }
public Navigation(INavigationAdapter navigationAdapter, IAuthentication authentication) { this.navigationAdapter = navigationAdapter; this.authentication = authentication; onLoggedOut = async(sender, args) => await OnLoggedOut(); needsPasswordChange = async(sender, args) => await NeedsPasswordChange(); authentication.NeedsPasswordChange += needsPasswordChange; authentication.LoggedOut += onLoggedOut; }
public LoginViewModel(IAuthentication authentication, Logging logging, INavigationAdapter navigation) { this.authentication = authentication; this.navigation = navigation; log = logging.GetLoggerFor <LoginViewModel>(); onLoggedIn = async(sender, args) => await OnLoggedIn(); authentication.LoggedIn += onLoggedIn; LoginCommand = new Command(async() => await Login(), CanLogin); }