Пример #1
0
        public IPartViewJunction GetParts()
        {
            var conjunction = new PartViewJunction()
            {
                Type = JunctionType.Conjunction, Builder = _builderFactory
            };

            foreach (var part in Parts)
            {
                if (part.GetParameter() != null)
                {
                    conjunction.Add(part);
                }
            }
            return(conjunction);
        }
Пример #2
0
 public IPartView Restore(PartViewDTO dto)
 {
     if (!String.IsNullOrEmpty(dto.JunctionType))
     {
         var junc = new PartViewJunction();
         junc.Type = dto.JunctionType.Equals(JunctionType.Conjunction.ToString()) ? JunctionType.Conjunction : JunctionType.Disjunction;
         foreach (var j in dto.JunctionPartViews)
         {
             junc.Add(this.Restore(j));
         }
         return(junc);
     }
     else
     {
         var part = new PartViewNodeImpl();
         part.SelectedPath    = _pathAssembler.Restore(dto.Path);
         part.SelectedBuilder = _builderAssembler.Restore(dto.Builder);
         part.Values          = dto.Values;
         part.Parser          = _parserAssembler.Restore(dto.Parser);
         return(part);
     }
 }