コード例 #1
0
        private Slicing readSlicing(Element element, XPathNavigator node)
        {
            Slicing slicing = new Slicing();

            slicing.Discriminator = new Path(Value(node, "f:slicing/f:discriminator/@value"));
            slicing.Path          = element.Path;
            //slicing.Rule = (SlicingRules)Enum.Parse(typeof(SlicingRules), Value(node, "f:slicing/f:rules/@value"));
            //slicing.Ordered = (Value(node, "f:slicing/f:ordered/@value").ToLower() == "true");
            return(slicing);
        }
コード例 #2
0
        public void PatchSliceInfo(Element element)
        {
            Slicing slicing = Slicings.FirstOrDefault(s => s.Path.Equals(element.Path));

            if (slicing != null)
            {
                element.Discriminator = slicing.Discriminator;
                element.Slice         = slicing.Count++;
            }
        }
コード例 #3
0
        public Element ReadElement(XPathNavigator node)
        {
            Element element = new Element();

            if (IsSliced(node))
            {
                Slicing s = readSlicing(element, node);
                Slicings.Add(s);
            }
            ReadElementDefinition(element, node);

            return(element);
        }
コード例 #4
0
 private Slicing readSlicing(Element element, XPathNavigator node)
 {
     Slicing slicing = new Slicing();
     slicing.Discriminator = new Path(Value(node, "f:slicing/f:discriminator/@value"));
     slicing.Path = element.Path;
     //slicing.Rule = (SlicingRules)Enum.Parse(typeof(SlicingRules), Value(node, "f:slicing/f:rules/@value"));
     //slicing.Ordered = (Value(node, "f:slicing/f:ordered/@value").ToLower() == "true");
     return slicing;
 }