DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB
Refactoring the umbrac context [TFS Changeset #57981]
This commit is contained in:
@@ -7,39 +7,6 @@ using System.Xml.Linq;
|
||||
|
||||
namespace umbraco.presentation
|
||||
{
|
||||
public class UmbracoServerUtility : HttpServerUtilityWrapper
|
||||
{
|
||||
private HttpServerUtility m_Server;
|
||||
|
||||
public UmbracoServerUtility(HttpServerUtility server) : base(server)
|
||||
{
|
||||
m_Server = server;
|
||||
}
|
||||
|
||||
public string UmbracoPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.Path;
|
||||
}
|
||||
}
|
||||
|
||||
public string ContentXmlPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.ContentXML;
|
||||
}
|
||||
}
|
||||
|
||||
public XDocument ContentXml
|
||||
{
|
||||
get
|
||||
{
|
||||
return XDocument.Load(this.ContentXmlPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Class that encapsulates Umbraco information of a specific HTTP request.
|
||||
/// </summary>
|
||||
|
||||
44
umbraco/presentation/UmbracoServerUtility.cs
Normal file
44
umbraco/presentation/UmbracoServerUtility.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using umbraco.presentation.LiveEditing;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace umbraco.presentation
|
||||
{
|
||||
public class UmbracoServerUtility : HttpServerUtilityWrapper
|
||||
{
|
||||
private HttpServerUtility m_Server;
|
||||
|
||||
public UmbracoServerUtility(HttpServerUtility server)
|
||||
: base(server)
|
||||
{
|
||||
m_Server = server;
|
||||
}
|
||||
|
||||
public string UmbracoPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.Path;
|
||||
}
|
||||
}
|
||||
|
||||
public string ContentXmlPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.ContentXML;
|
||||
}
|
||||
}
|
||||
|
||||
public XDocument ContentXml
|
||||
{
|
||||
get
|
||||
{
|
||||
return XDocument.Load(this.ContentXmlPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,6 +332,7 @@
|
||||
<Compile Include="UmbracoResponse.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UmbracoServerUtility.cs" />
|
||||
<Compile Include="umbraco\ActionHandlers\umbEnsureUniqueName.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
Reference in New Issue
Block a user