Can't change the web.config for a 4.7.x release, redid implementation to not require web.config change
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Web.WebPages;
|
||||
using umbraco.cms.businesslogic.macro;
|
||||
using umbraco.interfaces;
|
||||
using umbraco.MacroEngines.Library;
|
||||
|
||||
namespace umbraco.MacroEngines
|
||||
{
|
||||
@@ -57,11 +58,11 @@ namespace umbraco.MacroEngines
|
||||
return CultureDictionary[key];
|
||||
}
|
||||
|
||||
public IRazorLibrary Library
|
||||
public RazorLibraryCore Library
|
||||
{
|
||||
get
|
||||
{
|
||||
return new RazorLibraryImpl(_node);
|
||||
return new RazorLibraryCore(this._node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace umbraco.MacroEngines
|
||||
{
|
||||
public interface IRazorLibrary
|
||||
{
|
||||
INode Node { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace umbraco.MacroEngines
|
||||
{
|
||||
public class RazorLibraryImpl : IRazorLibrary
|
||||
{
|
||||
private readonly INode _node;
|
||||
|
||||
public RazorLibraryImpl(INode node)
|
||||
{
|
||||
_node = node;
|
||||
}
|
||||
public INode Node
|
||||
{
|
||||
get
|
||||
{
|
||||
return _node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,14 +2,29 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace umbraco.MacroEngines.Library
|
||||
{
|
||||
public static class RazorLibraryCore
|
||||
public class RazorLibraryCore
|
||||
{
|
||||
//public static string Helper1(this IRazorLibrary library, string defaultParam1 = "")
|
||||
//{
|
||||
// return defaultParam1;
|
||||
//}
|
||||
private INode _node;
|
||||
public INode Node
|
||||
{
|
||||
get { return _node; }
|
||||
}
|
||||
public RazorLibraryCore(INode node)
|
||||
{
|
||||
this._node = node;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string Helper1(string defaultParam1 = "")
|
||||
{
|
||||
return defaultParam1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="RazorCore\BaseContext.cs" />
|
||||
<Compile Include="RazorCore\IRazorLibrary.cs" />
|
||||
<Compile Include="RazorCore\RazorLibraryImpl.cs" />
|
||||
<Compile Include="RazorDynamicNode\DynamicMediaList.cs" />
|
||||
<Compile Include="RazorDynamicNode\DynamicNodeList.cs" />
|
||||
<Compile Include="RazorDynamicNode\RazorLibraryCore.cs" />
|
||||
|
||||
@@ -264,7 +264,6 @@
|
||||
<add namespace="Microsoft.Web.Helpers" />
|
||||
<add namespace="umbraco" />
|
||||
<add namespace="Examine" />
|
||||
<add namespace="umbraco.MacroEngines.Library"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
Reference in New Issue
Block a user