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:
agrath@gmail.com
2011-05-21 14:47:57 -12:00
parent 6a0dfc2c11
commit cd13f8de55
6 changed files with 23 additions and 49 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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" />

View File

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