Migrated logic to create a DataTable from a Node or pretty much any other object in to a central place so we only have to maintain code in one place.
Now need to just test it with Node and create the DynamicNode extension methods for returning as a DataTable.
This commit is contained in:
@@ -22,15 +22,15 @@ namespace umbraco.MacroEngines.Library
|
||||
|
||||
internal static INode ConvertToNode(this DynamicDocument doc)
|
||||
{
|
||||
var node = new SimpleNode(doc);
|
||||
var node = new ConvertedNode(doc);
|
||||
return node;
|
||||
}
|
||||
|
||||
private class SimpleNode : INode
|
||||
private class ConvertedNode : INode
|
||||
{
|
||||
private readonly DynamicDocument _doc;
|
||||
|
||||
public SimpleNode(DynamicDocument doc)
|
||||
public ConvertedNode(DynamicDocument doc)
|
||||
{
|
||||
_doc = doc;
|
||||
template = doc.TemplateId;
|
||||
|
||||
Reference in New Issue
Block a user