private static XElement GetMemberItem(int nodeId) { //TODO: Change this so that it is not using the LegacyLibrary, just serialize manually! var nodes = LegacyLibrary.GetMember(nodeId); return(XElement.Parse(nodes.Current.OuterXml)); }
public static XDocument ToXDocument(this Content node, bool cacheOnly) { if (cacheOnly && node.GetType().Equals(typeof(Document))) { var umbXml = LegacyLibrary.GetXmlNodeById(node.Id.ToString()); if (umbXml != null) { return(umbXml.ToXDocument()); } } //this will also occur if umbraco hasn't cached content yet.... //if it's not a using cache and it's not cacheOnly, then retrieve the Xml using the API return(node.ToXDocument()); }