Esempio n. 1
0
        public LoginViewModel(IAuthenticationService authService, IRegionManager regionManager, ILogger logger, IEventAggregator eventAggregator)
        {
            _authService   = authService;
            _regionManager = regionManager;
            _logger        = logger;

            LoginModel.ErrorsChanged += (s, e) => Errors = DictionaryFlattener.Flatten(LoginModel.GetAllErrors());
            LoginCommand              = new DelegateCommand <object>(async(obj) => await LoginClickAsync(obj));
            NavigateCommand           = new DelegateCommand <string>(Navigate);
            _eventAggregator          = eventAggregator;
        }
        private void HandleUserModelErrors()
        {
            var list = DictionaryFlattener.Flatten(UserModel.GetAllErrors());

            Logger.Warn(string.Join(Environment.NewLine, list));
        }