Example #1
0
        public virtual void When(IUserLoginStateRemoved e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Example #2
0
        public virtual UserLoginStateRemovedDto ToUserLoginStateRemovedDto(IUserLoginStateRemoved e)
        {
            var dto = new UserLoginStateRemovedDto();

            dto.UserLoginEventId = e.UserLoginEventId;
            dto.CreatedAt        = e.CreatedAt;
            dto.CreatedBy        = e.CreatedBy;
            dto.Version          = e.Version;
            dto.CommandId        = e.CommandId;

            return(dto);
        }
Example #3
0
        }// END Map(IMergePatch... ////////////////////////////

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


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }// END Map(IRemove... ////////////////////////////
Example #4
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... ////////////////////////////
Example #5
0
 void IUserStateDeleted.AddUserLoginEvent(IUserLoginStateRemoved e)
 {
     this._userLoginEvents.AddUserLoginEvent(e);
 }
Example #6
0
 public virtual void AddUserLoginEvent(IUserLoginStateRemoved e)
 {
     ThrowOnInconsistentEventIds(e);
     this._userLoginEvents[e.StateEventId] = e;
 }
Example #7
0
 public void AddUserLoginEvent(IUserLoginStateRemoved e)
 {
     _innerStateEvents.Add((UserLoginStateRemovedDto)e);
 }
Example #8
0
 void IUserLoginState.When(IUserLoginStateRemoved e)
 {
     throw new NotSupportedException();
 }