Files
Umbraco-CMS/umbraco.MacroEngines.Juno/RazorDynamicNode/DynamicNodeContext.cs
agrath@gmail.com b367f63c1d Fixed null reference problems with new dynamicbackingitem
Fixed recursive property null reference problems
Fixed issue with node having no children and property check crashing
Made DynamicXml behave more consistently based on user feedback
Added IsNull and HasValue to PropertyResult (comes back from GetProperty but you may need to cast it)
Added new Model.IsNull(string alias, bool recursive) and Model.HasValue(string alias, bool recursive) and Model.IsNull(string alias) and Model.HasValue(string alias)
2011-06-12 11:21:44 -02:00

26 lines
699 B
C#

using System;
using umbraco.cms.businesslogic.macro;
using umbraco.interfaces;
namespace umbraco.MacroEngines
{
public abstract class DynamicNodeContext : BaseContext<DynamicNode>
{
public override void SetMembers(MacroModel macro, INode node)
{
if (macro == null)
throw new ArgumentNullException("macro");
if (node == null)
throw new ArgumentNullException("node");
var backingItem = new DynamicBackingItem(node);
var dynamicNode = new DynamicNode(backingItem);
CurrentModel = dynamicNode;
base.SetMembers(macro, node);
}
}
}