diff --git a/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj b/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj index 9107c0f9d4..0ed95c3283 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj +++ b/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj @@ -109,6 +109,10 @@ {3ae7bf57-966b-45a5-910a-954d7c554441} Umbraco.Infrastructure + + {9b95eef7-63fe-4432-8c63-166be9c1a929} + Umbraco.Web.BackOffice + {651e1350-91b6-44b7-bd60-7207006d7003} Umbraco.Web diff --git a/src/Umbraco.Web.BackOffice/Compose/BackOfficeComponent.cs b/src/Umbraco.Web.BackOffice/Compose/BackOfficeComponent.cs new file mode 100644 index 0000000000..53dd8c2327 --- /dev/null +++ b/src/Umbraco.Web.BackOffice/Compose/BackOfficeComponent.cs @@ -0,0 +1,23 @@ +using Umbraco.Core.Composing; + +namespace Umbraco.Web.Runtime +{ + public sealed class BackOfficeComponent : IComponent + { + public BackOfficeComponent() + { + + } + + public void Initialize() + { + + } + + public void Terminate() + { + + } + + } +} diff --git a/src/Umbraco.Web.BackOffice/Compose/BackOfficeComposer.cs b/src/Umbraco.Web.BackOffice/Compose/BackOfficeComposer.cs new file mode 100644 index 0000000000..5ccb96ea71 --- /dev/null +++ b/src/Umbraco.Web.BackOffice/Compose/BackOfficeComposer.cs @@ -0,0 +1,26 @@ +using Umbraco.Core; +using Umbraco.Core.Composing; +using Umbraco.Core.Dashboards; +using Umbraco.Core.Runtime; +using Umbraco.Web.Services; + +namespace Umbraco.Web.Runtime +{ + // web's initial composer composes after core's, and before all core composers + [ComposeAfter(typeof(CoreInitialComposer))] + [ComposeBefore(typeof(ICoreComposer))] + public sealed class BackOfficeComposer : ComponentComposer + { + public override void Compose(Composition composition) + { + base.Compose(composition); + + composition.RegisterUnique(); + + // register core CMS dashboards and 3rd party types - will be ordered by weight attribute & merged with package.manifest dashboards + composition.Dashboards() + .Add(composition.TypeLoader.GetTypes()); + } + } +} + diff --git a/src/Umbraco.Web.BackOffice/CompositionExtensions.cs b/src/Umbraco.Web.BackOffice/CompositionExtensions.cs new file mode 100644 index 0000000000..eaf75bd7e5 --- /dev/null +++ b/src/Umbraco.Web.BackOffice/CompositionExtensions.cs @@ -0,0 +1,24 @@ +using Umbraco.Core.Composing; +using Umbraco.Web.Dashboards; + +// ReSharper disable once CheckNamespace +namespace Umbraco.Web +{ + /// + /// Provides extension methods to the class. + /// + public static class WebCompositionExtensions + { + #region Collection Builders + + /// + /// Gets the backoffice dashboards collection builder. + /// + /// The composition. + public static DashboardCollectionBuilder Dashboards(this Composition composition) + => composition.WithCollectionBuilder(); + + #endregion + + } +} diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/ContentDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/ContentDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/ContentDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs b/src/Umbraco.Web.BackOffice/Dashboards/DashboardCollectionBuilder.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/DashboardCollectionBuilder.cs rename to src/Umbraco.Web.BackOffice/Dashboards/DashboardCollectionBuilder.cs diff --git a/src/Umbraco.Web/Dashboards/ExamineDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/ExamineDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/ExamineDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/ExamineDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/FormsDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/FormsDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/FormsDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/FormsDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/HealthCheckDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/HealthCheckDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/HealthCheckDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/MediaDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/MediaDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/MediaDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/MediaDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/MembersDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/MembersDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/MembersDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/MembersDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/ProfilerDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/ProfilerDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/ProfilerDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/ProfilerDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/PublishedStatusDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/PublishedStatusDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/PublishedStatusDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Web.BackOffice/Dashboards/RedirectUrlDashboard.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs rename to src/Umbraco.Web.BackOffice/Dashboards/RedirectUrlDashboard.cs diff --git a/src/Umbraco.Web/Dashboards/SettingsDashboards.cs b/src/Umbraco.Web.BackOffice/Dashboards/SettingsDashboards.cs similarity index 100% rename from src/Umbraco.Web/Dashboards/SettingsDashboards.cs rename to src/Umbraco.Web.BackOffice/Dashboards/SettingsDashboards.cs diff --git a/src/Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj b/src/Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj new file mode 100644 index 0000000000..06939a3266 --- /dev/null +++ b/src/Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj @@ -0,0 +1,12 @@ + + + + netstandard2.0 + + + + + + + + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 276eed8344..63212b2fd4 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -128,6 +128,10 @@ {f6de8da0-07cc-4ef2-8a59-2bc81dbb3830} Umbraco.PublishedCache.NuCache + + {9b95eef7-63fe-4432-8c63-166be9c1a929} + Umbraco.Web.BackOffice + {651e1350-91b6-44b7-bd60-7207006d7003} Umbraco.Web diff --git a/src/Umbraco.Web/CompositionExtensions.cs b/src/Umbraco.Web/CompositionExtensions.cs index ae5a4f9773..c7c1da4ca9 100644 --- a/src/Umbraco.Web/CompositionExtensions.cs +++ b/src/Umbraco.Web/CompositionExtensions.cs @@ -104,13 +104,6 @@ namespace Umbraco.Web public static SectionCollectionBuilder Sections(this Composition composition) => composition.WithCollectionBuilder(); - /// - /// Gets the backoffice dashboards collection builder. - /// - /// The composition. - public static DashboardCollectionBuilder Dashboards(this Composition composition) - => composition.WithCollectionBuilder(); - /// /// Gets the backoffice OEmbed Providers collection builder. /// diff --git a/src/Umbraco.Web/Runtime/WebInitialComposer.cs b/src/Umbraco.Web/Runtime/WebInitialComposer.cs index c06d8e3777..48d1a58b2d 100644 --- a/src/Umbraco.Web/Runtime/WebInitialComposer.cs +++ b/src/Umbraco.Web/Runtime/WebInitialComposer.cs @@ -149,9 +149,7 @@ namespace Umbraco.Web.Runtime composition.RegisterUnique(); composition.RegisterUnique(); composition.RegisterUnique(); - composition.RegisterUnique(); - - composition.RegisterUnique(); + composition.RegisterUnique(); composition.RegisterUnique(); @@ -257,10 +255,6 @@ namespace Umbraco.Web.Runtime .Append() .Append(); - // register core CMS dashboards and 3rd party types - will be ordered by weight attribute & merged with package.manifest dashboards - composition.Dashboards() - .Add(composition.TypeLoader.GetTypes()); - // register back office trees // the collection builder only accepts types inheriting from TreeControllerBase // and will filter out those that are not attributed with TreeAttribute diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 5c226b257e..a02b3d6c55 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -145,17 +145,6 @@ - - - - - - - - - - - diff --git a/src/umbraco.sln b/src/umbraco.sln index d54554434e..2b9f9d004b 100644 --- a/src/umbraco.sln +++ b/src/umbraco.sln @@ -117,6 +117,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Examine", "Umbraco. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Examine.Lucene", "Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj", "{0FAD7D2A-D7DD-45B1-91FD-488BB6CDACEA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Web.BackOffice", "Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj", "{9B95EEF7-63FE-4432-8C63-166BE9C1A929}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -177,6 +179,10 @@ Global {0FAD7D2A-D7DD-45B1-91FD-488BB6CDACEA}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FAD7D2A-D7DD-45B1-91FD-488BB6CDACEA}.Release|Any CPU.ActiveCfg = Release|Any CPU {0FAD7D2A-D7DD-45B1-91FD-488BB6CDACEA}.Release|Any CPU.Build.0 = Release|Any CPU + {9B95EEF7-63FE-4432-8C63-166BE9C1A929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B95EEF7-63FE-4432-8C63-166BE9C1A929}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B95EEF7-63FE-4432-8C63-166BE9C1A929}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B95EEF7-63FE-4432-8C63-166BE9C1A929}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE