示例#1
0
        public User Login(string userName, string password, bool isPersistent, string customData)
        {
            // Check password and persist
            _currentUser = _session.Single<User>(u => u.Name == userName);

            _eventAggregator.GetEvent<LoginEvent>().Publish(_currentUser);

            return _currentUser;
        }
示例#2
0
        public void Logout()
        {
            _currentUser = null;

            _eventAggregator.GetEvent<LogoutEvent>().Publish(_currentUser);
        }