diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs old mode 100644 new mode 100755 index a8cf18cd23..3df69392ca --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -29,27 +29,19 @@ namespace Umbraco.Core.Runtime /// should be possible to use this runtime in console apps. public class CoreRuntime : IRuntime { - private readonly UmbracoApplicationBase _app; private BootLoader _bootLoader; private RuntimeState _state; /// /// Initializes a new instance of the class. /// - /// The Umbraco HttpApplication. - public CoreRuntime(UmbracoApplicationBase umbracoApplication) + public CoreRuntime() { - _app = umbracoApplication ?? throw new ArgumentNullException(nameof(umbracoApplication)); } /// public virtual void Boot(ServiceContainer container) { - // some components may want to initialize with the UmbracoApplicationBase - // well, they should not - we should not do this - // TODO remove this eventually. - container.RegisterInstance(_app); - Compose(container); // prepare essential stuff diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj old mode 100644 new mode 100755 index 2bfa52a80a..cc82f977d1 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -602,9 +602,6 @@ - - - @@ -1455,7 +1452,6 @@ - diff --git a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs old mode 100644 new mode 100755 index 770dead600..b3a96021b1 --- a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs +++ b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs @@ -14,6 +14,7 @@ using Umbraco.Core.Runtime; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Stubs; using Umbraco.Examine; +using Umbraco.Web; namespace Umbraco.Tests.Runtimes { @@ -80,8 +81,10 @@ namespace Umbraco.Tests.Runtimes public class TestRuntime : CoreRuntime { public TestRuntime(UmbracoApplicationBase umbracoApplication) - : base(umbracoApplication) - { } + : base() + { + _umbracoApplication = umbracoApplication; + } public override void Compose(ServiceContainer container) { @@ -115,6 +118,7 @@ namespace Umbraco.Tests.Runtimes } private MainDom _mainDom; + private readonly UmbracoApplicationBase _umbracoApplication; public override void Boot(ServiceContainer container) { diff --git a/src/Umbraco.Tests/Views/textpage.cshtml b/src/Umbraco.Tests/Views/textpage.cshtml new file mode 100755 index 0000000000..d7b4dce307 --- /dev/null +++ b/src/Umbraco.Tests/Views/textpage.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Mvc.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/src/Umbraco.Tests/Views/textpage1.cshtml b/src/Umbraco.Tests/Views/textpage1.cshtml new file mode 100755 index 0000000000..d7b4dce307 --- /dev/null +++ b/src/Umbraco.Tests/Views/textpage1.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Mvc.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/src/Umbraco.Core/Logging/WebProfiler.cs b/src/Umbraco.Web/Logging/WebProfiler.cs old mode 100644 new mode 100755 similarity index 97% rename from src/Umbraco.Core/Logging/WebProfiler.cs rename to src/Umbraco.Web/Logging/WebProfiler.cs index 7284ea05bd..77b57e768d --- a/src/Umbraco.Core/Logging/WebProfiler.cs +++ b/src/Umbraco.Web/Logging/WebProfiler.cs @@ -3,8 +3,10 @@ using System.Threading; using System.Web; using StackExchange.Profiling; using StackExchange.Profiling.SqlFormatters; +using Umbraco.Core; +using Umbraco.Core.Logging; -namespace Umbraco.Core.Logging +namespace Umbraco.Web.Logging { /// /// Implements by using the MiniProfiler framework. diff --git a/src/Umbraco.Core/Logging/WebProfilerComponent.cs b/src/Umbraco.Web/Logging/WebProfilerComponent.cs old mode 100644 new mode 100755 similarity index 96% rename from src/Umbraco.Core/Logging/WebProfilerComponent.cs rename to src/Umbraco.Web/Logging/WebProfilerComponent.cs index 338a7e72d6..c6c7b9a545 --- a/src/Umbraco.Core/Logging/WebProfilerComponent.cs +++ b/src/Umbraco.Web/Logging/WebProfilerComponent.cs @@ -1,8 +1,10 @@ using System; using System.Web; +using Umbraco.Core; using Umbraco.Core.Components; +using Umbraco.Core.Logging; -namespace Umbraco.Core.Logging +namespace Umbraco.Web.Logging { internal class WebProfilerComponent : UmbracoComponentBase, IUmbracoCoreComponent { diff --git a/src/Umbraco.Core/Logging/WebProfilerProvider.cs b/src/Umbraco.Web/Logging/WebProfilerProvider.cs old mode 100644 new mode 100755 similarity index 99% rename from src/Umbraco.Core/Logging/WebProfilerProvider.cs rename to src/Umbraco.Web/Logging/WebProfilerProvider.cs index 35ecd002c8..7b12c2f5bd --- a/src/Umbraco.Core/Logging/WebProfilerProvider.cs +++ b/src/Umbraco.Web/Logging/WebProfilerProvider.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Web; using StackExchange.Profiling; -namespace Umbraco.Core.Logging +namespace Umbraco.Web.Logging { /// /// This is a custom MiniProfiler WebRequestProfilerProvider (which is generally the default) that allows diff --git a/src/Umbraco.Web/Runtime/WebRuntime.cs b/src/Umbraco.Web/Runtime/WebRuntime.cs old mode 100644 new mode 100755 index 78610c01b8..da062367e9 --- a/src/Umbraco.Web/Runtime/WebRuntime.cs +++ b/src/Umbraco.Web/Runtime/WebRuntime.cs @@ -1,12 +1,12 @@ using System; using System.Web; using LightInject; -using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Runtime; +using Umbraco.Web.Logging; namespace Umbraco.Web.Runtime { @@ -16,6 +16,7 @@ namespace Umbraco.Web.Runtime /// On top of CoreRuntime, handles all of the web-related runtime aspects of Umbraco. public class WebRuntime : CoreRuntime { + private readonly UmbracoApplicationBase _umbracoApplication; private IProfiler _webProfiler; /// @@ -23,8 +24,10 @@ namespace Umbraco.Web.Runtime /// /// public WebRuntime(UmbracoApplicationBase umbracoApplication) - : base(umbracoApplication) - { } + : base() + { + _umbracoApplication = umbracoApplication; + } /// public override void Boot(ServiceContainer container) @@ -54,6 +57,10 @@ namespace Umbraco.Web.Runtime /// public override void Compose(ServiceContainer container) { + // some components may want to initialize with the UmbracoApplicationBase + // well, they should not - we should not do this + // TODO remove this eventually. + container.RegisterInstance(_umbracoApplication); base.Compose(container); // replace CoreRuntime's IProfiler registration diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj old mode 100644 new mode 100755 index 71a285e031..88131ad4e4 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -111,6 +111,9 @@ + + + @@ -181,6 +184,7 @@ + diff --git a/src/Umbraco.Core/UmbracoApplicationBase.cs b/src/Umbraco.Web/UmbracoApplicationBase.cs old mode 100644 new mode 100755 similarity index 99% rename from src/Umbraco.Core/UmbracoApplicationBase.cs rename to src/Umbraco.Web/UmbracoApplicationBase.cs index 1304244ece..7a88e61521 --- a/src/Umbraco.Core/UmbracoApplicationBase.cs +++ b/src/Umbraco.Web/UmbracoApplicationBase.cs @@ -4,11 +4,12 @@ using System.Threading; using System.Web; using System.Web.Hosting; using LightInject; +using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Logging.Serilog; -namespace Umbraco.Core +namespace Umbraco.Web { /// /// Provides an abstract base class for the Umbraco HttpApplication.