From accef6d96aef2c71549195f9b15efda883cd3640 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 18 Feb 2020 13:34:31 +0100 Subject: [PATCH] Merged Umbraco.Examine and Umbraco.Infrastructure and moved more files into Infrastructure --- .../Properties/AssemblyInfo.cs | 1 - src/Umbraco.Abstractions/Scheduling/KeepAlive.cs | 2 +- .../Scheduling/TempFileCleanup.cs | 2 +- .../Sync/IBatchedDatabaseServerMessenger.cs | 7 +++++++ src/Umbraco.Abstractions/UmbracoEvents.cs | 10 ++++++++++ .../Umbraco.Examine.Lucene.csproj | 1 - src/Umbraco.Examine/Umbraco.Examine.csproj | 1 - .../Examine}/BaseValueSetBuilder.cs | 0 .../Examine}/ContentIndexPopulator.cs | 0 .../Examine}/ContentValueSetBuilder.cs | 0 .../Examine}/ContentValueSetValidator.cs | 0 .../Examine}/ExamineExtensions.cs | 0 .../Examine}/GenericIndexDiagnostics.cs | 0 .../Examine}/IBackOfficeExamineSearcher.cs | 0 .../Examine}/IContentValueSetBuilder.cs | 0 .../Examine}/IContentValueSetValidator.cs | 0 .../Examine}/IIndexCreator.cs | 0 .../Examine}/IIndexDiagnostics.cs | 0 .../Examine}/IIndexDiagnosticsFactory.cs | 0 .../Examine}/IIndexPopulator.cs | 0 .../Examine}/IPublishedContentValueSetBuilder.cs | 0 .../Examine}/IUmbracoContentIndex.cs | 0 .../Examine}/IUmbracoIndex.cs | 0 .../Examine}/IUmbracoIndexConfig.cs | 0 .../Examine}/IUmbracoIndexesCreator.cs | 0 .../Examine}/IUmbracoMemberIndex.cs | 0 .../Examine}/IUmbracoTreeSearcherFields.cs | 0 .../Examine}/IValueSetBuilder.cs | 0 .../Examine}/IndexDiagnosticsFactory.cs | 0 .../Examine}/IndexPopulator.cs | 0 .../Examine}/IndexRebuilder.cs | 0 .../Examine}/IndexRebuildingEventArgs.cs | 0 .../Examine}/IndexTypes.cs | 0 .../Examine}/MediaIndexPopulator.cs | 0 .../Examine}/MediaValueSetBuilder.cs | 0 .../Examine}/MemberIndexPopulator.cs | 0 .../Examine}/MemberValueSetBuilder.cs | 0 .../Examine}/MemberValueSetValidator.cs | 0 .../Examine}/PublishedContentIndexPopulator.cs | 0 .../Examine}/UmbracoExamineExtensions.cs | 0 .../Examine}/UmbracoExamineFieldNames.cs | 0 .../Examine}/UmbracoFieldDefinitionCollection.cs | 0 .../Examine}/UmbracoIndexConfig.cs | 0 .../Examine}/ValueSetValidator.cs | 0 .../IPublishedContentQuery.cs | 2 -- .../PublishedContentQuery.cs | 0 .../Scheduling/ScheduledPublishing.cs | 8 +++++--- .../Search/BackgroundIndexRebuilder.cs | 0 .../Search/ExamineComponent.cs | 0 .../Search/ExamineComposer.cs | 0 .../Suspendable.cs | 12 ++++++------ .../Umbraco.Infrastructure.csproj | 5 +++++ .../BatchedDatabaseServerMessenger.cs | 2 +- src/Umbraco.Web/Scheduling/SchedulerComponent.cs | 8 +++++--- src/Umbraco.Web/Umbraco.Web.csproj | 16 ++-------------- src/umbraco.sln | 6 ------ 56 files changed, 43 insertions(+), 40 deletions(-) create mode 100644 src/Umbraco.Abstractions/Sync/IBatchedDatabaseServerMessenger.cs create mode 100644 src/Umbraco.Abstractions/UmbracoEvents.cs rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/BaseValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/ContentIndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/ContentValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/ContentValueSetValidator.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure/Examine}/ExamineExtensions.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/GenericIndexDiagnostics.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IBackOfficeExamineSearcher.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IContentValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IContentValueSetValidator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IIndexCreator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IIndexDiagnostics.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IIndexDiagnosticsFactory.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IIndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IPublishedContentValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoContentIndex.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoIndex.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoIndexConfig.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoIndexesCreator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoMemberIndex.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IUmbracoTreeSearcherFields.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IndexDiagnosticsFactory.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IndexRebuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IndexRebuildingEventArgs.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/IndexTypes.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/MediaIndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/MediaValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/MemberIndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/MemberValueSetBuilder.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/MemberValueSetValidator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/PublishedContentIndexPopulator.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/UmbracoExamineExtensions.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/UmbracoExamineFieldNames.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/UmbracoFieldDefinitionCollection.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/UmbracoIndexConfig.cs (100%) rename src/{Umbraco.Examine => Umbraco.Infrastructure/Examine}/ValueSetValidator.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/IPublishedContentQuery.cs (99%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/PublishedContentQuery.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Scheduling/ScheduledPublishing.cs (91%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Search/BackgroundIndexRebuilder.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Search/ExamineComponent.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Search/ExamineComposer.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Suspendable.cs (88%) diff --git a/src/Umbraco.Abstractions/Properties/AssemblyInfo.cs b/src/Umbraco.Abstractions/Properties/AssemblyInfo.cs index 6d5520f975..f129ca7731 100644 --- a/src/Umbraco.Abstractions/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Abstractions/Properties/AssemblyInfo.cs @@ -8,7 +8,6 @@ using System.Runtime.InteropServices; // Umbraco Cms [assembly: InternalsVisibleTo("Umbraco.Web")] [assembly: InternalsVisibleTo("Umbraco.Web.UI")] -[assembly: InternalsVisibleTo("Umbraco.Examine")] [assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.Embedded")] [assembly: InternalsVisibleTo("Umbraco.Tests")] diff --git a/src/Umbraco.Abstractions/Scheduling/KeepAlive.cs b/src/Umbraco.Abstractions/Scheduling/KeepAlive.cs index d1d9352ed6..c677c66b83 100644 --- a/src/Umbraco.Abstractions/Scheduling/KeepAlive.cs +++ b/src/Umbraco.Abstractions/Scheduling/KeepAlive.cs @@ -9,7 +9,7 @@ using Umbraco.Core.Sync; namespace Umbraco.Web.Scheduling { - internal class KeepAlive : RecurringTaskBase + public class KeepAlive : RecurringTaskBase { private readonly IRuntimeState _runtime; private readonly IKeepAliveSection _keepAliveSection; diff --git a/src/Umbraco.Abstractions/Scheduling/TempFileCleanup.cs b/src/Umbraco.Abstractions/Scheduling/TempFileCleanup.cs index 5d28bbfdb1..aefaf605db 100644 --- a/src/Umbraco.Abstractions/Scheduling/TempFileCleanup.cs +++ b/src/Umbraco.Abstractions/Scheduling/TempFileCleanup.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Scheduling /// /// Used to cleanup temporary file locations /// - internal class TempFileCleanup : RecurringTaskBase + public class TempFileCleanup : RecurringTaskBase { private readonly DirectoryInfo[] _tempFolders; private readonly TimeSpan _age; diff --git a/src/Umbraco.Abstractions/Sync/IBatchedDatabaseServerMessenger.cs b/src/Umbraco.Abstractions/Sync/IBatchedDatabaseServerMessenger.cs new file mode 100644 index 0000000000..f1b887ca3f --- /dev/null +++ b/src/Umbraco.Abstractions/Sync/IBatchedDatabaseServerMessenger.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Sync +{ + public interface IBatchedDatabaseServerMessenger : IServerMessenger + { + void FlushBatch(); + } +} diff --git a/src/Umbraco.Abstractions/UmbracoEvents.cs b/src/Umbraco.Abstractions/UmbracoEvents.cs new file mode 100644 index 0000000000..fe138425aa --- /dev/null +++ b/src/Umbraco.Abstractions/UmbracoEvents.cs @@ -0,0 +1,10 @@ +using System; +using Umbraco.Web.Routing; + +namespace Umbraco.Core +{ + public interface IUmbracoRouteEventSender + { + event EventHandler RouteAttempt; + } +} diff --git a/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj b/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj index 264f487b70..32ee1bdc4e 100644 --- a/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj +++ b/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj @@ -26,7 +26,6 @@ - diff --git a/src/Umbraco.Examine/Umbraco.Examine.csproj b/src/Umbraco.Examine/Umbraco.Examine.csproj index 03fab50692..f548d7ac61 100644 --- a/src/Umbraco.Examine/Umbraco.Examine.csproj +++ b/src/Umbraco.Examine/Umbraco.Examine.csproj @@ -12,7 +12,6 @@ - diff --git a/src/Umbraco.Examine/BaseValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/BaseValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs diff --git a/src/Umbraco.Examine/ContentIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/ContentIndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs diff --git a/src/Umbraco.Examine/ContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/ContentValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs diff --git a/src/Umbraco.Examine/ContentValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs similarity index 100% rename from src/Umbraco.Examine/ContentValueSetValidator.cs rename to src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs diff --git a/src/Umbraco.Web/ExamineExtensions.cs b/src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs similarity index 100% rename from src/Umbraco.Web/ExamineExtensions.cs rename to src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs diff --git a/src/Umbraco.Examine/GenericIndexDiagnostics.cs b/src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs similarity index 100% rename from src/Umbraco.Examine/GenericIndexDiagnostics.cs rename to src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs diff --git a/src/Umbraco.Examine/IBackOfficeExamineSearcher.cs b/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs similarity index 100% rename from src/Umbraco.Examine/IBackOfficeExamineSearcher.cs rename to src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs diff --git a/src/Umbraco.Examine/IContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/IContentValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs diff --git a/src/Umbraco.Examine/IContentValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs similarity index 100% rename from src/Umbraco.Examine/IContentValueSetValidator.cs rename to src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs diff --git a/src/Umbraco.Examine/IIndexCreator.cs b/src/Umbraco.Infrastructure/Examine/IIndexCreator.cs similarity index 100% rename from src/Umbraco.Examine/IIndexCreator.cs rename to src/Umbraco.Infrastructure/Examine/IIndexCreator.cs diff --git a/src/Umbraco.Examine/IIndexDiagnostics.cs b/src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs similarity index 100% rename from src/Umbraco.Examine/IIndexDiagnostics.cs rename to src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs diff --git a/src/Umbraco.Examine/IIndexDiagnosticsFactory.cs b/src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs similarity index 100% rename from src/Umbraco.Examine/IIndexDiagnosticsFactory.cs rename to src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs diff --git a/src/Umbraco.Examine/IIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/IIndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs diff --git a/src/Umbraco.Examine/IPublishedContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/IPublishedContentValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs diff --git a/src/Umbraco.Examine/IUmbracoContentIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoContentIndex.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs diff --git a/src/Umbraco.Examine/IUmbracoIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoIndex.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs diff --git a/src/Umbraco.Examine/IUmbracoIndexConfig.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoIndexConfig.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs diff --git a/src/Umbraco.Examine/IUmbracoIndexesCreator.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoIndexesCreator.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs diff --git a/src/Umbraco.Examine/IUmbracoMemberIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoMemberIndex.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs diff --git a/src/Umbraco.Examine/IUmbracoTreeSearcherFields.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs similarity index 100% rename from src/Umbraco.Examine/IUmbracoTreeSearcherFields.cs rename to src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs diff --git a/src/Umbraco.Examine/IValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/IValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs diff --git a/src/Umbraco.Examine/IndexDiagnosticsFactory.cs b/src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs similarity index 100% rename from src/Umbraco.Examine/IndexDiagnosticsFactory.cs rename to src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs diff --git a/src/Umbraco.Examine/IndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/IndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/IndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/IndexPopulator.cs diff --git a/src/Umbraco.Examine/IndexRebuilder.cs b/src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs similarity index 100% rename from src/Umbraco.Examine/IndexRebuilder.cs rename to src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs diff --git a/src/Umbraco.Examine/IndexRebuildingEventArgs.cs b/src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs similarity index 100% rename from src/Umbraco.Examine/IndexRebuildingEventArgs.cs rename to src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs diff --git a/src/Umbraco.Examine/IndexTypes.cs b/src/Umbraco.Infrastructure/Examine/IndexTypes.cs similarity index 100% rename from src/Umbraco.Examine/IndexTypes.cs rename to src/Umbraco.Infrastructure/Examine/IndexTypes.cs diff --git a/src/Umbraco.Examine/MediaIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/MediaIndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs diff --git a/src/Umbraco.Examine/MediaValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/MediaValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs diff --git a/src/Umbraco.Examine/MemberIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/MemberIndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs diff --git a/src/Umbraco.Examine/MemberValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs similarity index 100% rename from src/Umbraco.Examine/MemberValueSetBuilder.cs rename to src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs diff --git a/src/Umbraco.Examine/MemberValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs similarity index 100% rename from src/Umbraco.Examine/MemberValueSetValidator.cs rename to src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs diff --git a/src/Umbraco.Examine/PublishedContentIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs similarity index 100% rename from src/Umbraco.Examine/PublishedContentIndexPopulator.cs rename to src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs diff --git a/src/Umbraco.Examine/UmbracoExamineExtensions.cs b/src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs similarity index 100% rename from src/Umbraco.Examine/UmbracoExamineExtensions.cs rename to src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs diff --git a/src/Umbraco.Examine/UmbracoExamineFieldNames.cs b/src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs similarity index 100% rename from src/Umbraco.Examine/UmbracoExamineFieldNames.cs rename to src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs diff --git a/src/Umbraco.Examine/UmbracoFieldDefinitionCollection.cs b/src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs similarity index 100% rename from src/Umbraco.Examine/UmbracoFieldDefinitionCollection.cs rename to src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs diff --git a/src/Umbraco.Examine/UmbracoIndexConfig.cs b/src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs similarity index 100% rename from src/Umbraco.Examine/UmbracoIndexConfig.cs rename to src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs diff --git a/src/Umbraco.Examine/ValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs similarity index 100% rename from src/Umbraco.Examine/ValueSetValidator.cs rename to src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs diff --git a/src/Umbraco.Web/IPublishedContentQuery.cs b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs similarity index 99% rename from src/Umbraco.Web/IPublishedContentQuery.cs rename to src/Umbraco.Infrastructure/IPublishedContentQuery.cs index 7066475dc9..6a1621b229 100644 --- a/src/Umbraco.Web/IPublishedContentQuery.cs +++ b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs @@ -8,8 +8,6 @@ using Umbraco.Core.Xml; namespace Umbraco.Web { - using Examine = global::Examine; - /// /// Query methods used for accessing strongly typed content in templates /// diff --git a/src/Umbraco.Web/PublishedContentQuery.cs b/src/Umbraco.Infrastructure/PublishedContentQuery.cs similarity index 100% rename from src/Umbraco.Web/PublishedContentQuery.cs rename to src/Umbraco.Infrastructure/PublishedContentQuery.cs diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Infrastructure/Scheduling/ScheduledPublishing.cs similarity index 91% rename from src/Umbraco.Web/Scheduling/ScheduledPublishing.cs rename to src/Umbraco.Infrastructure/Scheduling/ScheduledPublishing.cs index 2e79e40d7a..b074704033 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Infrastructure/Scheduling/ScheduledPublishing.cs @@ -7,21 +7,23 @@ using Umbraco.Core.Sync; namespace Umbraco.Web.Scheduling { - internal class ScheduledPublishing : RecurringTaskBase + public class ScheduledPublishing : RecurringTaskBase { private readonly IRuntimeState _runtime; private readonly IContentService _contentService; private readonly IUmbracoContextFactory _umbracoContextFactory; private readonly ILogger _logger; + private readonly IServerMessenger _serverMessenger; public ScheduledPublishing(IBackgroundTaskRunner runner, int delayMilliseconds, int periodMilliseconds, - IRuntimeState runtime, IContentService contentService, IUmbracoContextFactory umbracoContextFactory, ILogger logger) + IRuntimeState runtime, IContentService contentService, IUmbracoContextFactory umbracoContextFactory, ILogger logger, IServerMessenger serverMessenger) : base(runner, delayMilliseconds, periodMilliseconds) { _runtime = runtime; _contentService = contentService; _umbracoContextFactory = umbracoContextFactory; _logger = logger; + _serverMessenger = serverMessenger; } public override bool PerformRun() @@ -76,7 +78,7 @@ namespace Umbraco.Web.Scheduling finally { // if running on a temp context, we have to flush the messenger - if (contextReference.IsRoot && Composing.Current.ServerMessenger is BatchedDatabaseServerMessenger m) + if (contextReference.IsRoot && _serverMessenger is IBatchedDatabaseServerMessenger m) m.FlushBatch(); } } diff --git a/src/Umbraco.Web/Search/BackgroundIndexRebuilder.cs b/src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs similarity index 100% rename from src/Umbraco.Web/Search/BackgroundIndexRebuilder.cs rename to src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Infrastructure/Search/ExamineComponent.cs similarity index 100% rename from src/Umbraco.Web/Search/ExamineComponent.cs rename to src/Umbraco.Infrastructure/Search/ExamineComponent.cs diff --git a/src/Umbraco.Web/Search/ExamineComposer.cs b/src/Umbraco.Infrastructure/Search/ExamineComposer.cs similarity index 100% rename from src/Umbraco.Web/Search/ExamineComposer.cs rename to src/Umbraco.Infrastructure/Search/ExamineComposer.cs diff --git a/src/Umbraco.Web/Suspendable.cs b/src/Umbraco.Infrastructure/Suspendable.cs similarity index 88% rename from src/Umbraco.Web/Suspendable.cs rename to src/Umbraco.Infrastructure/Suspendable.cs index a1d79d3619..7287d1c364 100644 --- a/src/Umbraco.Web/Suspendable.cs +++ b/src/Umbraco.Infrastructure/Suspendable.cs @@ -1,6 +1,6 @@ -using Umbraco.Core; +using Umbraco.Composing; +using Umbraco.Core.Cache; using Umbraco.Core.Logging; -using Umbraco.Web.Composing; using Umbraco.Examine; using Umbraco.Web.Cache; using Umbraco.Web.Search; @@ -34,7 +34,7 @@ namespace Umbraco.Web _suspended = true; } - public static void ResumeDocumentCache() + public static void ResumeDocumentCache(CacheRefresherCollection cacheRefresherCollection) { _suspended = false; @@ -43,7 +43,7 @@ namespace Umbraco.Web if (_tried == false) return; _tried = false; - var pageRefresher = Current.CacheRefreshers[ContentCacheRefresher.UniqueId]; + var pageRefresher = cacheRefresherCollection[ContentCacheRefresher.UniqueId]; pageRefresher.RefreshAll(); } } @@ -70,7 +70,7 @@ namespace Umbraco.Web _suspended = true; } - public static void ResumeIndexers(IndexRebuilder indexRebuilder, ILogger logger) + public static void ResumeIndexers(IndexRebuilder indexRebuilder, ILogger logger, BackgroundIndexRebuilder backgroundIndexRebuilder) { _suspended = false; @@ -79,7 +79,7 @@ namespace Umbraco.Web if (_tried == false) return; _tried = false; - Current.Factory.GetInstance().RebuildIndexes(false); + backgroundIndexRebuilder.RebuildIndexes(false); } } diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index b3b291a286..2421711773 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -27,6 +27,7 @@ + @@ -63,4 +64,8 @@ + + + + diff --git a/src/Umbraco.Web/BatchedDatabaseServerMessenger.cs b/src/Umbraco.Web/BatchedDatabaseServerMessenger.cs index a893fa6b49..a62aad3e5d 100644 --- a/src/Umbraco.Web/BatchedDatabaseServerMessenger.cs +++ b/src/Umbraco.Web/BatchedDatabaseServerMessenger.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web /// /// This binds to appropriate umbraco events in order to trigger the Boot(), Sync() & FlushBatch() calls /// - public class BatchedDatabaseServerMessenger : DatabaseServerMessenger + public class BatchedDatabaseServerMessenger : DatabaseServerMessenger, IBatchedDatabaseServerMessenger { private readonly IUmbracoDatabaseFactory _databaseFactory; private readonly IRequestCache _requestCache; diff --git a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs index ca6f0729eb..061f42b9ba 100644 --- a/src/Umbraco.Web/Scheduling/SchedulerComponent.cs +++ b/src/Umbraco.Web/Scheduling/SchedulerComponent.cs @@ -11,9 +11,9 @@ using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Scoping; using Umbraco.Core.Services; +using Umbraco.Core.Sync; using Umbraco.Web.HealthCheck; using Umbraco.Web.Routing; -using Current = Umbraco.Web.Composing.Current; namespace Umbraco.Web.Scheduling { @@ -36,6 +36,7 @@ namespace Umbraco.Web.Scheduling private readonly IHealthChecks _healthChecksConfig; private readonly IUmbracoSettingsSection _umbracoSettingsSection; private readonly IIOHelper _ioHelper; + private readonly IServerMessenger _serverMessenger; private BackgroundTaskRunner _keepAliveRunner; private BackgroundTaskRunner _publishingRunner; @@ -53,7 +54,7 @@ namespace Umbraco.Web.Scheduling HealthCheckCollection healthChecks, HealthCheckNotificationMethodCollection notifications, IScopeProvider scopeProvider, IUmbracoContextFactory umbracoContextFactory, IProfilingLogger logger, IHostingEnvironment hostingEnvironment, IHealthChecks healthChecksConfig, - IUmbracoSettingsSection umbracoSettingsSection, IIOHelper ioHelper) + IUmbracoSettingsSection umbracoSettingsSection, IIOHelper ioHelper, IServerMessenger serverMessenger) { _runtime = runtime; _contentService = contentService; @@ -68,6 +69,7 @@ namespace Umbraco.Web.Scheduling _healthChecksConfig = healthChecksConfig ?? throw new ArgumentNullException(nameof(healthChecksConfig)); _umbracoSettingsSection = umbracoSettingsSection ?? throw new ArgumentNullException(nameof(umbracoSettingsSection)); _ioHelper = ioHelper; + _serverMessenger = serverMessenger; } public void Initialize() @@ -140,7 +142,7 @@ namespace Umbraco.Web.Scheduling { // scheduled publishing/unpublishing // install on all, will only run on non-replica servers - var task = new ScheduledPublishing(_publishingRunner, DefaultDelayMilliseconds, OneMinuteMilliseconds, _runtime, _contentService, _umbracoContextFactory, _logger); + var task = new ScheduledPublishing(_publishingRunner, DefaultDelayMilliseconds, OneMinuteMilliseconds, _runtime, _contentService, _umbracoContextFactory, _logger, _serverMessenger); _publishingRunner.TryAdd(task); return task; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f549ae4622..cb4c3cf69a 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -111,10 +111,6 @@ {fbe7c065-dac0-4025-a78b-63b24d3ab00b} Umbraco.Configuration - - {f9b7fe05-0f93-4d0d-9c10-690b33ecbbd8} - Umbraco.Examine - {3ae7bf57-966b-45a5-910a-954d7c554441} Umbraco.Infrastructure @@ -194,7 +190,8 @@ - + + @@ -226,8 +223,6 @@ - - @@ -289,7 +284,6 @@ - @@ -315,7 +309,6 @@ - @@ -416,7 +409,6 @@ - @@ -463,7 +455,6 @@ - @@ -541,9 +532,7 @@ - - @@ -568,7 +557,6 @@ - diff --git a/src/umbraco.sln b/src/umbraco.sln index 2b9f9d004b..9b2dd71399 100644 --- a/src/umbraco.sln +++ b/src/umbraco.sln @@ -113,8 +113,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.TestData", "Umbraco EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.PublishedCache.NuCache", "Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj", "{F6DE8DA0-07CC-4EF2-8A59-2BC81DBB3830}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Examine", "Umbraco.Examine\Umbraco.Examine.csproj", "{F9B7FE05-0F93-4D0D-9C10-690B33ECBBD8}" -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}" @@ -171,10 +169,6 @@ Global {F6DE8DA0-07CC-4EF2-8A59-2BC81DBB3830}.Debug|Any CPU.Build.0 = Debug|Any CPU {F6DE8DA0-07CC-4EF2-8A59-2BC81DBB3830}.Release|Any CPU.ActiveCfg = Release|Any CPU {F6DE8DA0-07CC-4EF2-8A59-2BC81DBB3830}.Release|Any CPU.Build.0 = Release|Any CPU - {F9B7FE05-0F93-4D0D-9C10-690B33ECBBD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F9B7FE05-0F93-4D0D-9C10-690B33ECBBD8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F9B7FE05-0F93-4D0D-9C10-690B33ECBBD8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F9B7FE05-0F93-4D0D-9C10-690B33ECBBD8}.Release|Any CPU.Build.0 = Release|Any CPU {0FAD7D2A-D7DD-45B1-91FD-488BB6CDACEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {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