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:
Shannon Deminick
2012-09-15 12:17:42 +07:00
parent 1566b16f0f
commit 91834e8f53
4 changed files with 194 additions and 104 deletions

View File

@@ -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;