/// <summary> /// 获取此产生式结点列表(候选式)的复制品 /// </summary> /// <returns></returns> public object Clone() { var result = new ProductionNodeList(); result.AddRange( from item in this select(item.Clone() as ProductionNode)); return(result); }
/// <summary> /// From /// </summary> /// <param name="xProductionNodeList"></param> /// <returns></returns> public static ProductionNodeList From(XElement xProductionNodeList) { if (xProductionNodeList == null) { return(null); } if (xProductionNodeList.Name != strCandidate) { return(null); } var result = new ProductionNodeList(); result.AddRange( from item in xProductionNodeList.Elements(ProductionNode.strProductionNode) select ProductionNode.From(item) ); return(result); }