Beispiel #1
0
        public static Model.Control TranslateDTOControlToModelControl(DTO.Control c)
        {
            if (c == null)
            {
                return(null);
            }

            return(new Model.Control
            {
                Code = c.Code,
                ControlPriority = ControlPriorityMapper.TranslateDTOControlPriorityToModelControlPriority(c.ControlPriority),
                DefinitionSource = DefinitionSourceMapper.TranslateDTODefinitionSourceToModelDefinitionSource(c.DefinitionSource),
                Id = c.Id,
                MagpieCoreControlGuid = c.MagpieCoreControlGuid,
                Title = c.Title,
                Weight = c.Weight
            });
        }
Beispiel #2
0
        public static Model.ControlSet TranslateDTOControlSetToModelControlSet(DTO.ControlSet cs)
        {
            if (cs == null)
            {
                return(null);
            }

            return(new Model.ControlSet
            {
                Id = cs.Id,
                DefinitionSource = DefinitionSourceMapper.TranslateDTODefinitionSourceToModelDefinitionSource(cs.DefinitionSource),
                Code = cs.Code,
                Title = cs.Title,
                ControlSetClassification = ControlSetClassificationMapper.TranslateDTOControlSetClassificationToModelControlSetClassification(cs.ControlSetClassification),
                Controls = ControlMapper.TranslateDTOControlListToModelControlList(cs.Controls),
                MagpieCoreControlSetGuid = cs.MagpieCoreControlSetGuid,
                Version = cs.Version,
            });
        }