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); }
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++; } }
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); }
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; }