public static PsaParametersSet FromDtoToDomainObject(PsaParametersSetDto source)
        {
            PsaParametersSet target = new PsaParametersSet();

            target.Id         = source.Id;
            target.PsaTraceId = source.PsaTraceId;
            target.Type       = (PsaParametersSetType)source.Type;
            foreach (PsaParameterDataDto parameter in source.Parameters)
            {
                target.Parameters.Add(PsaParameterDataAssembler.FromDtoToDomainObject(parameter));
            }
            return(target);
        }
        public static PsaParametersSetDto FromDomainObjectToDto(PsaParametersSet source)
        {
            PsaParametersSetDto target = new PsaParametersSetDto();

            target.Parameters = new ObservableCollection <PsaParameterDataDto>();
            target.Id         = source.Id;
            target.PsaTraceId = source.PsaTraceId;
            target.Type       = (int)source.Type;
            foreach (PsaParameterData parameter in source.Parameters)
            {
                target.Parameters.Add(PsaParameterDataAssembler.FromDomainObjectToDto(parameter));
            }
            return(target);
        }
예제 #3
0
        public static PsaParametersSetEntity FromDtoToEntity(PsaParametersSetDto source)
        {
            PsaParametersSetEntity target = new PsaParametersSetEntity();

            target.Id = source.Id;
            target.PsaTraceEntityId     = source.PsaTraceId;
            target.Type                 = source.Type;
            target.EcuLabel             = source.EcuLabel;
            target.EcuName              = source.EcuName;
            target.OriginalTypeId       = source.OriginalTypeId;
            target.AdditionalSourceInfo = source.AdditionalSourceInfo;
            foreach (PsaParameterDataDto parameter in source.Parameters)
            {
                target.PsaParameterData.Add(PsaParameterDataAssembler.FromDtoToEntity(parameter));
            }
            return(target);
        }
예제 #4
0
        public static PsaParametersSetDto FromEntityToDto(PsaParametersSetEntity source)
        {
            PsaParametersSetDto target = new PsaParametersSetDto();

            target.Parameters           = new List <PsaParameterDataDto>();
            target.Id                   = source.Id;
            target.PsaTraceId           = source.PsaTraceEntityId;
            target.Type                 = source.Type;
            target.EcuLabel             = source.EcuLabel;
            target.EcuName              = source.EcuName;
            target.OriginalTypeId       = source.OriginalTypeId;
            target.AdditionalSourceInfo = source.AdditionalSourceInfo;
            foreach (PsaParameterDataEntity parameter in source.PsaParameterData)
            {
                target.Parameters.Add(PsaParameterDataAssembler.FromEntityToDto(parameter));
            }
            return(target);
        }
        public static PsaParametersSetDto FromDomainObjectToDto(PsaParametersSet source)
        {
            PsaParametersSetDto target = new PsaParametersSetDto();

            target.Id         = source.Id;
            target.PsaTraceId = source.PsaTraceId;
            target.Type       = (int)source.Type;
            target.EcuName    = source.EcuName;
            target.EcuLabel   = source.EcuLabel;
            List <PsaParameterDataDto> dtos = new List <PsaParameterDataDto>();

            foreach (PsaParameterData parameter in source.Parameters)
            {
                dtos.Add(PsaParameterDataAssembler.FromDomainObjectToDto(parameter));
            }
            target.Parameters = dtos.ToArray();
            return(target);
        }
        public static PsaParametersSet FromDtoToDomainObject(PsaParametersSetDto source)
        {
            var target = new PsaParametersSet
            {
                Id                   = source.Id,
                PsaTraceId           = source.PsaTraceId,
                Type                 = (PsaParametersSetType)source.Type,
                EcuLabel             = source.EcuLabel,
                EcuName              = source.EcuName,
                OriginalTypeId       = source.OriginalTypeId,
                AdditionalSourceInfo = source.AdditionalSourceInfo
            };

            foreach (PsaParameterDataDto parameter in source.Parameters)
            {
                target.Parameters.Add(PsaParameterDataAssembler.FromDtoToDomainObject(parameter));
            }
            return(target);
        }