예제 #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 AttributeStateMergePatchedDto ToAttributeStateMergePatchedDto(IAttributeStateMergePatched e)
        {
            var dto = new AttributeStateMergePatchedDto();

            dto.AttributeEventId     = e.AttributeEventId;
            dto.CreatedAt            = e.CreatedAt;
            dto.CreatedBy            = e.CreatedBy;
            dto.CommandId            = e.CommandId;
            dto.AttributeName        = e.AttributeName;
            dto.OrganizationId       = e.OrganizationId;
            dto.Description          = e.Description;
            dto.IsMandatory          = e.IsMandatory;
            dto.AttributeValueType   = e.AttributeValueType;
            dto.AttributeValueLength = e.AttributeValueLength;
            dto.IsList      = e.IsList;
            dto.FieldName   = e.FieldName;
            dto.ReferenceId = e.ReferenceId;
            dto.Active      = e.Active;
            dto.IsPropertyAttributeNameRemoved        = e.IsPropertyAttributeNameRemoved;
            dto.IsPropertyOrganizationIdRemoved       = e.IsPropertyOrganizationIdRemoved;
            dto.IsPropertyDescriptionRemoved          = e.IsPropertyDescriptionRemoved;
            dto.IsPropertyIsMandatoryRemoved          = e.IsPropertyIsMandatoryRemoved;
            dto.IsPropertyAttributeValueTypeRemoved   = e.IsPropertyAttributeValueTypeRemoved;
            dto.IsPropertyAttributeValueLengthRemoved = e.IsPropertyAttributeValueLengthRemoved;
            dto.IsPropertyIsListRemoved      = e.IsPropertyIsListRemoved;
            dto.IsPropertyFieldNameRemoved   = e.IsPropertyFieldNameRemoved;
            dto.IsPropertyReferenceIdRemoved = e.IsPropertyReferenceIdRemoved;
            dto.IsPropertyActiveRemoved      = e.IsPropertyActiveRemoved;
            var attributeValueEvents = new List <AttributeValueStateCreatedOrMergePatchedOrRemovedDto>();

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

            var attributeAliasEvents = new List <AttributeAliasStateCreatedOrMergePatchedOrRemovedDto>();

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


            return(dto);
        }