private static ShowPlanElement ReadPlanElement(XPathNavigator elementNavigator) { ShowPlanOperator op = (ShowPlanOperator)Enum.Parse(typeof(ShowPlanOperator), elementNavigator.GetAttribute("operator", String.Empty)); List <ShowPlanProperty> properties = new List <ShowPlanProperty>(); foreach (XPathNavigator propertyNavigator in elementNavigator.Select("properties/property")) { string propertyName = propertyNavigator.GetAttribute("name", String.Empty); string propertyValue = propertyNavigator.GetAttribute("value", String.Empty); ShowPlanProperty property = new ShowPlanProperty(propertyName, propertyValue); properties.Add(property); } List <ShowPlanElement> children = new List <ShowPlanElement>(); foreach (XPathNavigator childNode in elementNavigator.Select("input/*")) { ShowPlanElement childElement = ReadPlanElement(childNode); children.Add(childElement); } ShowPlanElement element = new ShowPlanElement(op, properties, children); return(element); }
internal ShowPlanElement(ShowPlanOperator op, IList<ShowPlanProperty> properties, IList<ShowPlanElement> children) { _operator = op; _properties = new ShowPlanPropertyCollection(properties); _children = new ShowPlanElementCollection(children); BuildPathElementRoot(); }
internal ShowPlanElement(ShowPlanOperator op, IList <ShowPlanProperty> properties, IList <ShowPlanElement> children) { _operator = op; _properties = new ShowPlanPropertyCollection(properties); _children = new ShowPlanElementCollection(children); BuildPathElementRoot(); }
internal ShowPlanElement(ShowPlanOperator op, IList<ShowPlanProperty> properties, params ShowPlanElement[] children) : this(op, properties, (IList<ShowPlanElement>)children) { }
internal ShowPlanElement(ShowPlanOperator op, IList <ShowPlanProperty> properties, params ShowPlanElement[] children) : this(op, properties, (IList <ShowPlanElement>)children) { }