Esempio n. 1
0
        public virtual UserClaimStateRemovedDto NewUserClaimStateRemoved(int claimId)
        {
            var e   = new UserClaimStateRemovedDto();
            var eId = NewUserClaimEventId(claimId);

            e.UserClaimEventId = eId;
            return(e);
        }
Esempio n. 2
0
        public virtual UserClaimStateRemovedDto ToUserClaimStateRemovedDto(IUserClaimStateRemoved e)
        {
            var dto = new UserClaimStateRemovedDto();

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

            return(dto);
        }
Esempio n. 3
0
        public virtual UserStateDeletedDto ToUserStateDeletedDto(IUserStateDeleted e)
        {
            var dto = new UserStateDeletedDto();

            dto.StateEventId = new UserStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;
            var userRoleEvents = new List <UserRoleStateRemovedDto>();

            foreach (var ee in e.UserRoleEvents)
            {
                UserRoleStateRemovedDto eeDto = UserRoleStateEventDtoConverter.ToUserRoleStateRemovedDto(ee);
                userRoleEvents.Add(eeDto);
            }
            dto.UserRoleEvents = userRoleEvents.ToArray();

            var userClaimEvents = new List <UserClaimStateRemovedDto>();

            foreach (var ee in e.UserClaimEvents)
            {
                UserClaimStateRemovedDto eeDto = UserClaimStateEventDtoConverter.ToUserClaimStateRemovedDto(ee);
                userClaimEvents.Add(eeDto);
            }
            dto.UserClaimEvents = userClaimEvents.ToArray();

            var userPermissionEvents = new List <UserPermissionStateRemovedDto>();

            foreach (var ee in e.UserPermissionEvents)
            {
                UserPermissionStateRemovedDto eeDto = UserPermissionStateEventDtoConverter.ToUserPermissionStateRemovedDto(ee);
                userPermissionEvents.Add(eeDto);
            }
            dto.UserPermissionEvents = userPermissionEvents.ToArray();

            var userLoginEvents = new List <UserLoginStateRemovedDto>();

            foreach (var ee in e.UserLoginEvents)
            {
                UserLoginStateRemovedDto eeDto = UserLoginStateEventDtoConverter.ToUserLoginStateRemovedDto(ee);
                userLoginEvents.Add(eeDto);
            }
            dto.UserLoginEvents = userLoginEvents.ToArray();


            return(dto);
        }