Beispiel #1
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IUserLoginStateRemoved MapRemove(IRemoveUserLogin c, IUserCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateRemoved e = NewUserLoginStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }// END Map(IRemove... ////////////////////////////
Beispiel #2
0
        protected virtual IUserLoginStateCreated MapCreate(ICreateUserLogin c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateCreated e = NewUserLoginStateCreated(stateEventId);
            var s = outerState.UserLogins.Get(c.LoginKey);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
Beispiel #3
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserLoginStateMergePatched MapMergePatch(IMergePatchUserLogin c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateMergePatched e = NewUserLoginStateMergePatched(stateEventId);
            var s = outerState.UserLogins.Get(c.LoginKey);

            e.Active = c.Active;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserLoginStateEventId other = obj as UserLoginStateEventId;

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

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.LoginKey, other.LoginKey) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
Beispiel #5
0
        protected UserLoginStateEventId NewUserLoginStateEventId(LoginKey loginKey)
        {
            var stateEventId = new UserLoginStateEventId(this.StateEventId.UserId, loginKey, this.StateEventId.Version);

            return(stateEventId);
        }
 public UserLoginStateEventIdDto(UserLoginStateEventId val)
 {
     this._value = val;
 }
Beispiel #7
0
 protected UserLoginStateEventBase(UserLoginStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Beispiel #8
0
 public UserLoginStateRemoved(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #9
0
 public UserLoginStateMergePatched(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #10
0
 public UserLoginStateCreated(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #11
0
 private UserLoginStateRemoved NewUserLoginStateRemoved(UserLoginStateEventId stateEventId)
 {
     return(new UserLoginStateRemoved(stateEventId));
 }
Beispiel #12
0
 private UserLoginStateMergePatched NewUserLoginStateMergePatched(UserLoginStateEventId stateEventId)
 {
     return(new UserLoginStateMergePatched(stateEventId));
 }