示例#1
0
        private TExpressionParameterDTO createExpressionContainerParameterDTOFrom(string containerName, string compartmentName,
                                                                                  string groupName, IParameter moleculeParameter)
        {
            var moleculeName = moleculeParameter.ParentContainer.Name;
            var group        = _groupRepository.GroupByName(groupName);

            var dto = new TExpressionParameterDTO
            {
                MoleculeName       = moleculeName,
                ContainerName      = containerName,
                CompartmentName    = compartmentName,
                GroupName          = groupName,
                GroupingPathDTO    = _representationInfoRepository.PathElementFor(RepresentationObjectType.GROUP, groupName),
                ContainerPathDTO   = _representationInfoRepository.PathElementFor(RepresentationObjectType.CONTAINER, containerName),
                CompartmentPathDTO = _representationInfoRepository.PathElementFor(RepresentationObjectType.CONTAINER, compartmentName),
                Sequence           = group.Sequence
            };

            dto.Parameter = _parameterMapper.MapFrom(moleculeParameter, dto, x => x.Value, x => x.Parameter);
            return(dto);
        }