public YqlNode Clone() { #if true YqlNode clonedNode = (YqlNode)Activator.CreateInstance(GetType()); clonedNode.CopyFrom(this); #else XElement xxx = this.SaveToXml(); Debug.WriteLine(xxx.ToString()); YqlNode clonedNode = YqlNode.LoadFromXml(xxx); #endif return(clonedNode); }
protected void LoadFromXml(XElement element) { this.Title = XmlUtilities.GetStringAttribute(element, "Title"); this.FilterNode = YqlNode.LoadFromXml(XmlUtilities.GetChildElement(element, "FilterNode")); }