From 0bd8b33011ec6e2f6e65fd20f05cfdb7fb726c6c Mon Sep 17 00:00:00 2001 From: slace Date: Wed, 12 Aug 2009 11:20:19 +0000 Subject: [PATCH] DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB Refactoring the umbrac context [TFS Changeset #57981] --- umbraco/presentation/UmbracoContext.cs | 33 -------------- umbraco/presentation/UmbracoServerUtility.cs | 44 +++++++++++++++++++ .../presentation/umbraco.presentation.csproj | 1 + 3 files changed, 45 insertions(+), 33 deletions(-) create mode 100644 umbraco/presentation/UmbracoServerUtility.cs diff --git a/umbraco/presentation/UmbracoContext.cs b/umbraco/presentation/UmbracoContext.cs index 9e1e669888..2479c664f1 100644 --- a/umbraco/presentation/UmbracoContext.cs +++ b/umbraco/presentation/UmbracoContext.cs @@ -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); - } - } - } /// /// Class that encapsulates Umbraco information of a specific HTTP request. /// diff --git a/umbraco/presentation/UmbracoServerUtility.cs b/umbraco/presentation/UmbracoServerUtility.cs new file mode 100644 index 0000000000..b642c621bf --- /dev/null +++ b/umbraco/presentation/UmbracoServerUtility.cs @@ -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); + } + } + } +} diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj index 6cead08543..26df62b9bc 100644 --- a/umbraco/presentation/umbraco.presentation.csproj +++ b/umbraco/presentation/umbraco.presentation.csproj @@ -332,6 +332,7 @@ Code + Code