/// <summary> /// 获取此上下文无关产生式列表的复制品 /// </summary> /// <returns></returns> public object Clone() { var result = new ContextfreeProductionList(); result.AddRange( from item in this select(item.Clone() as ContextfreeProduction)); return(result); }
/// <summary> /// From /// </summary> /// <param name="xContextfreeProductionList"></param> /// <returns></returns> public static ContextfreeProductionList From(XElement xContextfreeProductionList) { if (xContextfreeProductionList == null) { return(null); } if (xContextfreeProductionList.Name != strContextfreeProductionList) { return(null); } var result = new ContextfreeProductionList(); result.AddRange( from item in xContextfreeProductionList.Elements(ContextfreeProduction.strContextfreeProduction) select ContextfreeProduction.From(item) ); return(result); }