Merged Umbraco.Examine and Umbraco.Infrastructure and moved more files into Infrastructure
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Umbraco.Web.Scheduling
|
||||
/// <summary>
|
||||
/// Used to cleanup temporary file locations
|
||||
/// </summary>
|
||||
internal class TempFileCleanup : RecurringTaskBase
|
||||
public class TempFileCleanup : RecurringTaskBase
|
||||
{
|
||||
private readonly DirectoryInfo[] _tempFolders;
|
||||
private readonly TimeSpan _age;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Sync
|
||||
{
|
||||
public interface IBatchedDatabaseServerMessenger : IServerMessenger
|
||||
{
|
||||
void FlushBatch();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using Umbraco.Web.Routing;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
public interface IUmbracoRouteEventSender
|
||||
{
|
||||
event EventHandler<RoutableAttemptEventArgs> RouteAttempt;
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Umbraco.Abstractions\Umbraco.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Examine\Umbraco.Examine.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Umbraco.Abstractions\Umbraco.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
-2
@@ -8,8 +8,6 @@ using Umbraco.Core.Xml;
|
||||
|
||||
namespace Umbraco.Web
|
||||
{
|
||||
using Examine = global::Examine;
|
||||
|
||||
/// <summary>
|
||||
/// Query methods used for accessing strongly typed content in templates
|
||||
/// </summary>
|
||||
+5
-3
@@ -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<RecurringTaskBase> 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();
|
||||
}
|
||||
}
|
||||
@@ -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<BackgroundIndexRebuilder>().RebuildIndexes(false);
|
||||
backgroundIndexRebuilder.RebuildIndexes(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
|
||||
<PackageReference Include="Examine.Core" Version="2.0.0-alpha.20200128.15" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -63,4 +64,8 @@
|
||||
<Compile Remove="obj\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Routing" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Umbraco.Web
|
||||
/// <remarks>
|
||||
/// This binds to appropriate umbraco events in order to trigger the Boot(), Sync() & FlushBatch() calls
|
||||
/// </remarks>
|
||||
public class BatchedDatabaseServerMessenger : DatabaseServerMessenger
|
||||
public class BatchedDatabaseServerMessenger : DatabaseServerMessenger, IBatchedDatabaseServerMessenger
|
||||
{
|
||||
private readonly IUmbracoDatabaseFactory _databaseFactory;
|
||||
private readonly IRequestCache _requestCache;
|
||||
|
||||
@@ -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<IBackgroundTask> _keepAliveRunner;
|
||||
private BackgroundTaskRunner<IBackgroundTask> _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;
|
||||
}
|
||||
|
||||
@@ -111,10 +111,6 @@
|
||||
<Project>{fbe7c065-dac0-4025-a78b-63b24d3ab00b}</Project>
|
||||
<Name>Umbraco.Configuration</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Umbraco.Examine\Umbraco.Examine.csproj">
|
||||
<Project>{f9b7fe05-0f93-4d0d-9c10-690b33ecbbd8}</Project>
|
||||
<Name>Umbraco.Examine</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj">
|
||||
<Project>{3ae7bf57-966b-45a5-910a-954d7c554441}</Project>
|
||||
<Name>Umbraco.Infrastructure</Name>
|
||||
@@ -194,7 +190,8 @@
|
||||
<Compile Include="PropertyEditors\ValueConverters\RteMacroRenderingValueConverter.cs" />
|
||||
<Compile Include="RoutableDocumentFilter.cs" />
|
||||
<Compile Include="Runtime\AspNetUmbracoBootPermissionChecker.cs" />
|
||||
<Compile Include="Search\BackgroundIndexRebuilder.cs" />
|
||||
<Compile Include="Scheduling\SchedulerComponent.cs" />
|
||||
<Compile Include="Scheduling\SchedulerComposer.cs" />
|
||||
<Compile Include="Search\ExamineFinalComponent.cs" />
|
||||
<Compile Include="Search\ExamineFinalComposer.cs" />
|
||||
<Compile Include="Search\ExamineUserComponent.cs" />
|
||||
@@ -226,8 +223,6 @@
|
||||
<Compile Include="PropertyEditors\GridPropertyIndexValueFactory.cs" />
|
||||
<Compile Include="Routing\RedirectTrackingComposer.cs" />
|
||||
<Compile Include="Runtime\WebInitialComposer.cs" />
|
||||
<Compile Include="Scheduling\SchedulerComposer.cs" />
|
||||
<Compile Include="Search\ExamineComposer.cs" />
|
||||
<Compile Include="Security\ActiveDirectoryBackOfficeUserPasswordChecker.cs" />
|
||||
<Compile Include="Security\BackOfficeClaimsIdentityFactory.cs" />
|
||||
<Compile Include="Security\BackOfficeUserManagerMarker.cs" />
|
||||
@@ -289,7 +284,6 @@
|
||||
<Compile Include="Editors\BackOfficeNotificationsController.cs" />
|
||||
<Compile Include="Install\InstallStepCollection.cs" />
|
||||
<Compile Include="Install\InstallSteps\ConfigureMachineKey.cs" />
|
||||
<Compile Include="IPublishedContentQuery.cs" />
|
||||
<Compile Include="Editors\MemberGroupController.cs" />
|
||||
<Compile Include="Composing\CompositionExtensions\Controllers.cs" />
|
||||
<Compile Include="Editors\EditorValidator.cs" />
|
||||
@@ -315,7 +309,6 @@
|
||||
<Compile Include="SignalR\IPreviewHub.cs" />
|
||||
<Compile Include="SignalR\PreviewHub.cs" />
|
||||
<Compile Include="SignalR\PreviewHubComponent.cs" />
|
||||
<Compile Include="Suspendable.cs" />
|
||||
<Compile Include="Trees\ContentBlueprintTreeController.cs" />
|
||||
<Compile Include="Trees\RelationTypeTreeController.cs" />
|
||||
<Compile Include="Trees\MacrosTreeController.cs" />
|
||||
@@ -416,7 +409,6 @@
|
||||
<Compile Include="Editors\MemberController.cs" />
|
||||
<Compile Include="Editors\CurrentUserController.cs" />
|
||||
<Compile Include="PropertyEditors\RichTextPreValueController.cs" />
|
||||
<Compile Include="PublishedContentQuery.cs" />
|
||||
<Compile Include="ImageCropperTemplateExtensions.cs" />
|
||||
<Compile Include="Mvc\UmbracoVirtualNodeRouteHandler.cs" />
|
||||
<Compile Include="Security\AppBuilderExtensions.cs" />
|
||||
@@ -463,7 +455,6 @@
|
||||
<Compile Include="Mvc\ViewDataDictionaryExtensions.cs" />
|
||||
<Compile Include="Models\RegisterModel.cs" />
|
||||
<Compile Include="Editors\MediaTypeController.cs" />
|
||||
<Compile Include="Scheduling\ScheduledPublishing.cs" />
|
||||
<Compile Include="Security\MembershipHelper.cs" />
|
||||
<Compile Include="Editors\SectionController.cs" />
|
||||
<Compile Include="Editors\UmbracoAuthorizedJsonController.cs" />
|
||||
@@ -541,9 +532,7 @@
|
||||
<Compile Include="Mvc\UmbracoMvcHandler.cs" />
|
||||
<Compile Include="Mvc\UmbracoViewPageOfTModel.cs" />
|
||||
<Compile Include="PublishedContentExtensions.cs" />
|
||||
<Compile Include="ExamineExtensions.cs" />
|
||||
<Compile Include="HtmlHelperRenderExtensions.cs" />
|
||||
<Compile Include="Scheduling\SchedulerComponent.cs" />
|
||||
<Compile Include="ModelStateExtensions.cs" />
|
||||
<Compile Include="Mvc\HtmlTagWrapper.cs" />
|
||||
<Compile Include="Mvc\HtmlTagWrapperTextNode.cs" />
|
||||
@@ -568,7 +557,6 @@
|
||||
<Compile Include="Routing\ContentFinderByPageIdQuery.cs" />
|
||||
<Compile Include="Routing\PublishedRouter.cs" />
|
||||
<Compile Include="Search\ExamineSearcherModel.cs" />
|
||||
<Compile Include="Search\ExamineComponent.cs" />
|
||||
<Compile Include="Compose\DatabaseServerRegistrarAndMessengerComponent.cs" />
|
||||
<Compile Include="Templates\TemplateRenderer.cs" />
|
||||
<Compile Include="Trees\PartialViewMacrosTreeController.cs" />
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user