示例#1
0
        public virtual AttributeStateDeletedDto ToAttributeStateDeletedDto(IAttributeStateDeleted e)
        {
            var dto = new AttributeStateDeletedDto();

            dto.AttributeEventId = e.AttributeEventId;
            dto.CreatedAt        = e.CreatedAt;
            dto.CreatedBy        = e.CreatedBy;
            dto.CommandId        = e.CommandId;
            var attributeValueEvents = new List <AttributeValueStateRemovedDto>();

            foreach (var ee in e.AttributeValueEvents)
            {
                AttributeValueStateRemovedDto eeDto = AttributeValueStateEventDtoConverter.ToAttributeValueStateRemovedDto(ee);
                attributeValueEvents.Add(eeDto);
            }
            dto.AttributeValueEvents = attributeValueEvents.ToArray();

            var attributeAliasEvents = new List <AttributeAliasStateRemovedDto>();

            foreach (var ee in e.AttributeAliasEvents)
            {
                AttributeAliasStateRemovedDto eeDto = AttributeAliasStateEventDtoConverter.ToAttributeAliasStateRemovedDto(ee);
                attributeAliasEvents.Add(eeDto);
            }
            dto.AttributeAliasEvents = attributeAliasEvents.ToArray();


            return(dto);
        }
示例#2
0
        public virtual AttributeValueStateRemovedDto NewAttributeValueStateRemoved(string value)
        {
            var e   = new AttributeValueStateRemovedDto();
            var eId = NewAttributeValueStateEventId(value);

            e.StateEventId = eId;
            return(e);
        }
示例#3
0
        public virtual AttributeValueStateRemovedDto ToAttributeValueStateRemovedDto(IAttributeValueStateRemoved e)
        {
            var dto = new AttributeValueStateRemovedDto();

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

            return(dto);
        }