예제 #1
0
        public virtual UserLoginStateRemovedDto NewUserLoginStateRemoved(LoginKey loginKey)
        {
            var e   = new UserLoginStateRemovedDto();
            var eId = NewUserLoginStateEventId(loginKey);

            e.StateEventId = eId;
            return(e);
        }
예제 #2
0
        private UserLoginStateEventIdDto NewUserLoginStateEventId(LoginKey loginKey)
        {
            var eId = new UserLoginStateEventIdDto();

            eId.UserId      = this.StateEventId.UserId;
            eId.LoginKey    = new LoginKeyDto(loginKey);
            eId.UserVersion = this.StateEventId.Version;
            return(eId);
        }
예제 #3
0
        public virtual IUserLoginState Get(LoginKey loginKey)
        {
            UserLoginId globalId = new UserLoginId(_userState.UserId, loginKey);

            if (_loadedUserLoginStates.ContainsKey(globalId))
            {
                return(_loadedUserLoginStates[globalId]);
            }
            var state = UserLoginStateDao.Get(globalId);

            _loadedUserLoginStates.Add(globalId, state);
            return(state);
        }
예제 #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            LoginKey other = obj as LoginKey;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.LoginProvider, other.LoginProvider) &&
                   Object.Equals(this.ProviderKey, other.ProviderKey)
                   );
        }
예제 #5
0
 public LoginKeyDto(LoginKey val)
 {
     this._value = val;
 }
예제 #6
0
 public IUserLoginState Get(LoginKey loginKey)
 {
     throw new NotSupportedException();
 }
예제 #7
0
        public virtual IUserLoginStateRemoved NewUserLoginStateRemoved(LoginKey loginKey)
        {
            var stateEvent = new UserLoginStateRemoved(NewUserLoginStateEventId(loginKey));

            return(stateEvent);
        }
예제 #8
0
        protected UserLoginStateEventId NewUserLoginStateEventId(LoginKey loginKey)
        {
            var stateEventId = new UserLoginStateEventId(this.StateEventId.UserId, loginKey, this.StateEventId.Version);

            return(stateEventId);
        }
예제 #9
0
 IUserLoginStateRemoved IUserStateDeleted.NewUserLoginStateRemoved(LoginKey loginKey)
 {
     return(NewUserLoginStateRemoved(loginKey));
 }
예제 #10
0
 IUserLoginStateRemoved IUserStateMergePatched.NewUserLoginStateRemoved(LoginKey loginKey)
 {
     return(NewUserLoginStateRemoved(loginKey));
 }
예제 #11
0
 IUserLoginStateCreated IUserStateCreated.NewUserLoginStateCreated(LoginKey loginKey)
 {
     return(NewUserLoginStateCreated(loginKey));
 }
예제 #12
0
 public UserLoginId(string userId, LoginKey loginKey)
 {
     this._userId   = userId;
     this._loginKey = loginKey;
 }
예제 #13
0
 public virtual IUserLoginState GetUserLogin(string userId, LoginKey loginKey)
 {
     return(StateRepository.GetUserLogin(userId, loginKey));
 }
예제 #14
0
 public LoginKeyFlattenedDto(LoginKey val)
 {
     this._value = val;
 }
예제 #15
0
 public UserLoginStateEventId(string userId, LoginKey loginKey, long userVersion)
 {
     this._userId      = userId;
     this._loginKey    = loginKey;
     this._userVersion = userVersion;
 }