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)
This commit is contained in:
@@ -2,16 +2,21 @@
|
||||
using umbraco.cms.businesslogic.macro;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace umbraco.MacroEngines {
|
||||
namespace umbraco.MacroEngines
|
||||
{
|
||||
|
||||
public abstract class DynamicNodeContext : BaseContext<DynamicNode> {
|
||||
public abstract class DynamicNodeContext : BaseContext<DynamicNode>
|
||||
{
|
||||
|
||||
public override void SetMembers(MacroModel macro, INode node) {
|
||||
public override void SetMembers(MacroModel macro, INode node)
|
||||
{
|
||||
if (macro == null)
|
||||
throw new ArgumentNullException("macro");
|
||||
if (node == null)
|
||||
throw new ArgumentNullException("node");
|
||||
CurrentModel = new DynamicNode(node);
|
||||
var backingItem = new DynamicBackingItem(node);
|
||||
var dynamicNode = new DynamicNode(backingItem);
|
||||
CurrentModel = dynamicNode;
|
||||
base.SetMembers(macro, node);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user