Files
Umbraco-CMS/umbraco.MacroEngines.Juno/DynamicNodeContext.cs
Elijah af79bb24e5 Added Medium Trust Support, Razor DLL's can now exist in the GAC or BIN
Added Inline Razor Support - Caches Templates In The App_Data directory for now
Taken out umbdebug from the engine, as it caches the debug content
Custom Build Provider - Future Stub
2011-01-20 17:52:56 -10:00

31 lines
974 B
C#

using System;
using System.Web.WebPages;
using umbraco.cms.businesslogic.macro;
using umbraco.interfaces;
namespace umbraco.MacroEngines {
public abstract class DynamicNodeContext : WebPage, IMacroContext {
private MacroModel _macro;
private DynamicNode _dynamicNode;
private ParameterDictionary _parameters;
public dynamic Parameters { get { return _parameters; } }
public MacroModel Macro { get { return _macro; } }
public DynamicNode Current { get { return _dynamicNode; } }
public void SetMembers(MacroModel macro, INode node) {
if (macro == null)
throw new ArgumentNullException("macro");
if (node == null)
throw new ArgumentNullException("node");
_macro = macro;
_dynamicNode = new DynamicNode(node);
_parameters = new ParameterDictionary(macro.Properties);
}
}
}