Ejemplo n.º 1
0
        public virtual AttributeUseStateRemovedDto NewAttributeUseStateRemoved(string attributeId)
        {
            var e   = new AttributeUseStateRemovedDto();
            var eId = NewAttributeUseEventId(attributeId);

            e.AttributeUseEventId = eId;
            return(e);
        }
        public virtual AttributeUseStateRemovedDto ToAttributeUseStateRemovedDto(IAttributeUseStateRemoved e)
        {
            var dto = new AttributeUseStateRemovedDto();

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

            return(dto);
        }
        public virtual AttributeSetStateDeletedDto ToAttributeSetStateDeletedDto(IAttributeSetStateDeleted e)
        {
            var dto = new AttributeSetStateDeletedDto();

            dto.StateEventId = new AttributeSetStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;
            var attributeUseEvents = new List <AttributeUseStateRemovedDto>();

            foreach (var ee in e.AttributeUseEvents)
            {
                AttributeUseStateRemovedDto eeDto = AttributeUseStateEventDtoConverter.ToAttributeUseStateRemovedDto(ee);
                attributeUseEvents.Add(eeDto);
            }
            dto.AttributeUseEvents = attributeUseEvents.ToArray();


            return(dto);
        }