Esempio n. 1
0
        public virtual void When(IUserPermissionMvoStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Esempio n. 2
0
        protected virtual IUserPermissionMvoStateDeleted Map(IDeleteUserPermissionMvo c)
        {
            var stateEventId = new UserPermissionMvoEventId(c.UserPermissionId, c.UserVersion);
            IUserPermissionMvoStateDeleted e = NewUserPermissionMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Esempio n. 3
0
        protected virtual IUserPermissionMvoStateDeleted Map(IDeleteUserPermissionMvo c)
        {
            var stateEventId = new UserPermissionMvoStateEventId(c.UserPermissionId, c.UserVersion);
            IUserPermissionMvoStateDeleted e = NewUserPermissionMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
 void IUserPermissionMvoState.When(IUserPermissionMvoStateDeleted e)
 {
     throw new NotSupportedException();
 }
 public void AddUserPermissionMvoEvent(IUserPermissionMvoStateDeleted e)
 {
     _innerStateEvents.Add((UserPermissionMvoStateDeletedDto)e);
 }
Esempio n. 6
0
        public virtual void Delete(IDeleteUserPermissionMvo c)
        {
            IUserPermissionMvoStateDeleted e = Map(c);

            Apply(e);
        }
        public virtual UserPermissionMvoStateDeletedDto ToUserPermissionMvoStateDeletedDto(IUserPermissionMvoStateDeleted e)
        {
            var dto = new UserPermissionMvoStateDeletedDto();

            dto.StateEventId = new UserPermissionMvoStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;

            return(dto);
        }