Esempio n. 1
0
        public virtual AttributeAliasStateCreatedDto NewAttributeAliasStateCreated(string code)
        {
            var e   = new AttributeAliasStateCreatedDto();
            var eId = NewAttributeAliasEventId(code);

            e.AttributeAliasEventId = eId;
            return(e);
        }
Esempio n. 2
0
        public virtual AttributeAliasStateCreatedDto ToAttributeAliasStateCreatedDto(IAttributeAliasStateCreated e)
        {
            var dto = new AttributeAliasStateCreatedDto();

            dto.AttributeAliasEventId = e.AttributeAliasEventId;
            dto.CreatedAt             = e.CreatedAt;
            dto.CreatedBy             = e.CreatedBy;
            dto.Version   = e.Version;
            dto.CommandId = e.CommandId;
            dto.Name      = e.Name;
            dto.Active    = e.Active;
            return(dto);
        }
Esempio n. 3
0
        public virtual AttributeStateCreatedDto ToAttributeStateCreatedDto(IAttributeStateCreated e)
        {
            var dto = new AttributeStateCreatedDto();

            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;
            var attributeValueEvents = new List <AttributeValueStateCreatedDto>();

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

            var attributeAliasEvents = new List <AttributeAliasStateCreatedDto>();

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

            return(dto);
        }