Revert examine to use composers, until we have migrated that to .net standard
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
/// <remarks>
|
||||
/// <para>User composers compose after core composers, and before the final composer.</para>
|
||||
/// </remarks>
|
||||
[ComposeAfter(typeof(IComposer))]
|
||||
public interface IUserComposer : IComposer
|
||||
{ }
|
||||
}
|
||||
|
||||
18
src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs
Normal file
18
src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Infrastructure.Examine
|
||||
{
|
||||
// We want to run after core composers since we are replacing some items
|
||||
public sealed class ExamineLuceneComposer :IComposer
|
||||
{
|
||||
public void Compose(IUmbracoBuilder builder)
|
||||
{
|
||||
builder.AddExamineLucene();
|
||||
}
|
||||
}
|
||||
}
|
||||
17
src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs
Normal file
17
src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Infrastructure.Examine
|
||||
{
|
||||
// examine's Lucene final composer composes after all user composers
|
||||
// and *also* after ICoreComposer (in case IUserComposer is disabled)
|
||||
[ComposeAfter(typeof(IUserComposer))]
|
||||
public class ExamineLuceneFinalComposer : IComposer
|
||||
{
|
||||
public void Compose(IUmbracoBuilder builder) => builder.AddExamineIndexConfiguration();
|
||||
}
|
||||
}
|
||||
@@ -90,9 +90,13 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
s_firstTestInSession = false;
|
||||
|
||||
// Ensure CoreRuntime stopped (now it's a HostedService)
|
||||
IHost host = Services.GetRequiredService<IHost>();
|
||||
await host.StopAsync();
|
||||
host.Dispose();
|
||||
IHost host = Services?.GetService<IHost>();
|
||||
if (host is not null)
|
||||
{
|
||||
await host.StopAsync();
|
||||
host.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services
|
||||
protected override void CustomTestSetup(IUmbracoBuilder builder)
|
||||
{
|
||||
builder.Services.AddUnique<IServerMessenger, ScopedRepositoryTests.LocalServerMessenger>();
|
||||
// builder.AddCoreNotifications();
|
||||
}
|
||||
|
||||
private void AssertJsonStartsWith(int id, string expected)
|
||||
|
||||
@@ -464,6 +464,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Components
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public class Composer4 : TestComposerBase
|
||||
{
|
||||
}
|
||||
@@ -524,6 +525,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Components
|
||||
{
|
||||
}
|
||||
|
||||
[ComposeAfter(typeof(Composer2))]
|
||||
[ComposeAfter(typeof(Composer4))]
|
||||
public class Composer9 : TestComposerBase, ITestComposer
|
||||
{
|
||||
}
|
||||
|
||||
@@ -298,7 +298,8 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on the current state of the application, this configures the scope variables that control the main tree and language drop down
|
||||
* Based on the current state of the application, this configures the scope variables that
|
||||
* l the main tree and language drop down
|
||||
*/
|
||||
function configureTreeAndLanguages() {
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace Umbraco.Cms.Web.UI.NetCore
|
||||
.AddBackOffice()
|
||||
.AddWebsite()
|
||||
.AddComposers()
|
||||
.AddExamineIndexConfiguration()
|
||||
.Build();
|
||||
#pragma warning restore IDE0022 // Use expression body for methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user