private static RawMemberNode ToRawNode(XElement ele) { if (ele == null) { return(null); } var node = new RawMemberNode(); if (ele.HasAttributes) { node.Attributes = ele.Attributes().ToDictionary(att => att.Name.LocalName, att => att.Value); } if (ele.HasElements) { node.ChildNodes = ele.Elements().Select(child => ToRawNode(child)); } else { node.Value = ele.Value; } node.TagName = ele.Name.LocalName; return(node); }
public static GeneralRawMemberNode Init(RawMemberNode node) { var model = new GeneralRawMemberNode(node); return(node.ToModel <GeneralRawMemberNode>(model)); }
private GeneralRawMemberNode(RawMemberNode node) { this.node = node; }