From 2cb6378c26d4fbb61f295ac9b61a19a1cdd424fe Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 28 Dec 2017 09:27:57 +0100 Subject: [PATCH] Reorg code, move stuff --- .../{ => Collections}/OrderedHashSet.cs | 2 +- .../Events/QueuingEventDispatcherBase.cs | 1 + src/Umbraco.Core/{ => Runtime}/CoreRuntime.cs | 6 ++---- .../{ => Runtime}/CoreRuntimeComponent.cs | 6 +++--- src/Umbraco.Core/Umbraco.Core.csproj | 6 +++--- .../Collections/OrderedHashSetTests.cs | 1 + .../Routing/RenderRouteHandlerTests.cs | 1 + src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs | 1 + src/Umbraco.Tests/Runtimes/WebRuntimeTests.cs | 1 + src/Umbraco.Web/{ => Runtime}/WebRuntime.cs | 7 ++++--- .../{ => Runtime}/WebRuntimeComponent.cs | 13 +++++++------ .../LegacyServerRegistrarAndMessengerComponent.cs | 1 + src/Umbraco.Web/Umbraco.Web.csproj | 4 ++-- src/Umbraco.Web/UmbracoApplication.cs | 1 + src/Umbraco.Web/UmbracoContext.cs | 1 + 15 files changed, 30 insertions(+), 22 deletions(-) rename src/Umbraco.Core/{ => Collections}/OrderedHashSet.cs (97%) rename src/Umbraco.Core/{ => Runtime}/CoreRuntime.cs (99%) rename src/Umbraco.Core/{ => Runtime}/CoreRuntimeComponent.cs (99%) rename src/Umbraco.Web/{ => Runtime}/WebRuntime.cs (98%) rename src/Umbraco.Web/{ => Runtime}/WebRuntimeComponent.cs (99%) diff --git a/src/Umbraco.Core/OrderedHashSet.cs b/src/Umbraco.Core/Collections/OrderedHashSet.cs similarity index 97% rename from src/Umbraco.Core/OrderedHashSet.cs rename to src/Umbraco.Core/Collections/OrderedHashSet.cs index 9a9d304459..beae17adea 100644 --- a/src/Umbraco.Core/OrderedHashSet.cs +++ b/src/Umbraco.Core/Collections/OrderedHashSet.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; -namespace Umbraco.Core +namespace Umbraco.Core.Collections { /// /// A custom collection similar to HashSet{T} which only contains unique items, however this collection keeps items in order diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs index 4d4c97093a..3f5bad4734 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Core.Collections; using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Composing; diff --git a/src/Umbraco.Core/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs similarity index 99% rename from src/Umbraco.Core/CoreRuntime.cs rename to src/Umbraco.Core/Runtime/CoreRuntime.cs index 57f4b13356..9ba8e8d4a3 100644 --- a/src/Umbraco.Core/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -4,11 +4,10 @@ using System.Configuration; using System.Threading; using System.Web; using LightInject; -using Semver; using Umbraco.Core.Cache; using Umbraco.Core.Components; -using Umbraco.Core.Configuration; using Umbraco.Core.Composing; +using Umbraco.Core.Configuration; using Umbraco.Core.Exceptions; using Umbraco.Core.IO; using Umbraco.Core.Logging; @@ -18,9 +17,8 @@ using Umbraco.Core.Persistence.Dtos; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Persistence.SqlSyntax; using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Implement; -namespace Umbraco.Core +namespace Umbraco.Core.Runtime { /// /// Represents the Core Umbraco runtime. diff --git a/src/Umbraco.Core/CoreRuntimeComponent.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComponent.cs similarity index 99% rename from src/Umbraco.Core/CoreRuntimeComponent.cs rename to src/Umbraco.Core/Runtime/CoreRuntimeComponent.cs index 0e9d8cb0c6..309edffd27 100644 --- a/src/Umbraco.Core/CoreRuntimeComponent.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComponent.cs @@ -6,10 +6,10 @@ using AutoMapper; using LightInject; using Umbraco.Core.Cache; using Umbraco.Core.Components; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Composing; using Umbraco.Core.Composing.CompositionRoots; +using Umbraco.Core.Configuration; +using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Manifest; @@ -25,7 +25,7 @@ using Umbraco.Core.Sync; using Umbraco.Core._Legacy.PackageActions; using IntegerValidator = Umbraco.Core.PropertyEditors.IntegerValidator; -namespace Umbraco.Core +namespace Umbraco.Core.Runtime { public class CoreRuntimeComponent : UmbracoComponentBase, IRuntimeComponent { diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index c808ae0a33..b42b768be8 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -312,8 +312,8 @@ - - + + @@ -775,7 +775,7 @@ - + diff --git a/src/Umbraco.Tests/Collections/OrderedHashSetTests.cs b/src/Umbraco.Tests/Collections/OrderedHashSetTests.cs index 59542f1b22..a98348751b 100644 --- a/src/Umbraco.Tests/Collections/OrderedHashSetTests.cs +++ b/src/Umbraco.Tests/Collections/OrderedHashSetTests.cs @@ -1,6 +1,7 @@ using System; using NUnit.Framework; using Umbraco.Core; +using Umbraco.Core.Collections; namespace Umbraco.Tests.Collections { diff --git a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs index 2091064889..08d0cbadbe 100644 --- a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs +++ b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs @@ -18,6 +18,7 @@ using Umbraco.Web.WebApi; using Umbraco.Core.Strings; using Umbraco.Core.Composing; using Umbraco.Tests.Testing; +using Umbraco.Web.Runtime; using Current = Umbraco.Web.Composing.Current; namespace Umbraco.Tests.Routing diff --git a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs index 94935cd961..b73f6e6c56 100644 --- a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs +++ b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs @@ -9,6 +9,7 @@ using Umbraco.Core.Components; using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Persistence; +using Umbraco.Core.Runtime; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.TestHelpers.Stubs; using Umbraco.Examine; diff --git a/src/Umbraco.Tests/Runtimes/WebRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/WebRuntimeTests.cs index 7717dc178e..b9f8f6576b 100644 --- a/src/Umbraco.Tests/Runtimes/WebRuntimeTests.cs +++ b/src/Umbraco.Tests/Runtimes/WebRuntimeTests.cs @@ -4,6 +4,7 @@ using NUnit.Framework; using Umbraco.Core.Profiling; using Umbraco.Web; using Umbraco.Web.Mvc; +using Umbraco.Web.Runtime; namespace Umbraco.Tests.Runtimes { diff --git a/src/Umbraco.Web/WebRuntime.cs b/src/Umbraco.Web/Runtime/WebRuntime.cs similarity index 98% rename from src/Umbraco.Web/WebRuntime.cs rename to src/Umbraco.Web/Runtime/WebRuntime.cs index 741f735f38..78610c01b8 100644 --- a/src/Umbraco.Web/WebRuntime.cs +++ b/src/Umbraco.Web/Runtime/WebRuntime.cs @@ -2,12 +2,13 @@ using System.Web; using LightInject; using Umbraco.Core; -using Umbraco.Core.Logging; using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; using Umbraco.Core.Composing; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; +using Umbraco.Core.Runtime; -namespace Umbraco.Web +namespace Umbraco.Web.Runtime { /// /// Represents the Web Umbraco runtime. diff --git a/src/Umbraco.Web/WebRuntimeComponent.cs b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs similarity index 99% rename from src/Umbraco.Web/WebRuntimeComponent.cs rename to src/Umbraco.Web/Runtime/WebRuntimeComponent.cs index b1f6481782..e6ea06e752 100644 --- a/src/Umbraco.Web/WebRuntimeComponent.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs @@ -14,8 +14,8 @@ using LightInject; using Microsoft.AspNet.SignalR; using Umbraco.Core; using Umbraco.Core.Components; -using Umbraco.Core.Configuration; using Umbraco.Core.Composing; +using Umbraco.Core.Configuration; using Umbraco.Core.Dictionary; using Umbraco.Core.Events; using Umbraco.Core.Logging; @@ -23,8 +23,11 @@ using Umbraco.Core.Macros; using Umbraco.Core.Profiling; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.ValueConverters; +using Umbraco.Core.Runtime; using Umbraco.Core.Services; +using Umbraco.Examine; using Umbraco.Web.Cache; +using Umbraco.Web.Composing.CompositionRoots; using Umbraco.Web.Dictionary; using Umbraco.Web.Editors; using Umbraco.Web.HealthCheck; @@ -34,19 +37,17 @@ using Umbraco.Web.Media.ThumbnailProviders; using Umbraco.Web.Mvc; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; +using Umbraco.Web.Search; using Umbraco.Web.Security; using Umbraco.Web.Services; using Umbraco.Web.SignalR; +using Umbraco.Web.Trees; using Umbraco.Web.UI.JavaScript; using Umbraco.Web.WebApi; using Umbraco.Web._Legacy.Actions; -using Umbraco.Examine; -using Umbraco.Web.Composing.CompositionRoots; -using Umbraco.Web.Search; -using Umbraco.Web.Trees; using Current = Umbraco.Web.Composing.Current; -namespace Umbraco.Web +namespace Umbraco.Web.Runtime { [RequireComponent(typeof(CoreRuntimeComponent))] public class WebRuntimeComponent : UmbracoComponentBase, IRuntimeComponent diff --git a/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs index 6f956f88c6..327be338a5 100644 --- a/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs +++ b/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs @@ -5,6 +5,7 @@ using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Services; using LightInject; +using Umbraco.Web.Runtime; namespace Umbraco.Web.Strategies { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index d027321617..d16dbb1845 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -347,7 +347,7 @@ - + @@ -1153,7 +1153,7 @@ - + diff --git a/src/Umbraco.Web/UmbracoApplication.cs b/src/Umbraco.Web/UmbracoApplication.cs index caf6879fba..5b0743676e 100644 --- a/src/Umbraco.Web/UmbracoApplication.cs +++ b/src/Umbraco.Web/UmbracoApplication.cs @@ -1,4 +1,5 @@ using Umbraco.Core; +using Umbraco.Web.Runtime; namespace Umbraco.Web { diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 31d67cc118..152d7e0f92 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -6,6 +6,7 @@ using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; +using Umbraco.Web.Runtime; using Umbraco.Web.Security; namespace Umbraco.Web