Updates to latest Examine version
The latest Examine version has some API breaking changes - namely it shouldn't have been relying on IOptionsSnapshot and instead IOptionsMonitor.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Umbraco.Cms.Infrastructure.Examine
|
||||
LuceneIndex index,
|
||||
ILogger<LuceneIndexDiagnostics> logger,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IOptionsSnapshot<LuceneDirectoryIndexOptions> indexOptions)
|
||||
IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions)
|
||||
{
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_indexOptions = indexOptions.Get(index.Name);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<None Remove="obj\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Examine" Version="2.0.0-beta.154" />
|
||||
<PackageReference Include="Examine" Version="2.0.0-beta.168" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Cms.Infrastructure.Examine
|
||||
public UmbracoContentIndex(
|
||||
ILoggerFactory loggerFactory,
|
||||
string name,
|
||||
IOptionsSnapshot<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IRuntimeState runtimeState,
|
||||
ILocalizationService languageService = null)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Umbraco.Cms.Infrastructure.Examine
|
||||
protected UmbracoExamineIndex(
|
||||
ILoggerFactory loggerFactory,
|
||||
string name,
|
||||
IOptionsSnapshot<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IRuntimeState runtimeState)
|
||||
: base(loggerFactory, name, indexOptions)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Umbraco.Cms.Infrastructure.Examine
|
||||
UmbracoExamineIndex index,
|
||||
ILogger<UmbracoExamineIndexDiagnostics> logger,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IOptionsSnapshot<LuceneDirectoryIndexOptions> indexOptions)
|
||||
IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions)
|
||||
: base(index, logger, hostingEnvironment, indexOptions)
|
||||
{
|
||||
_index = index;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Umbraco.Cms.Infrastructure.Examine
|
||||
public UmbracoMemberIndex(
|
||||
ILoggerFactory loggerFactory,
|
||||
string name,
|
||||
IOptionsSnapshot<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IRuntimeState runtimeState)
|
||||
: base(loggerFactory, name, indexOptions, hostingEnvironment, runtimeState)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Examine.Lucene" Version="2.0.0-beta.154" />
|
||||
<PackageReference Include="Examine.Lucene" Version="2.0.0-beta.168" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
||||
|
||||
@@ -241,8 +241,8 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine
|
||||
// return i;
|
||||
//}
|
||||
|
||||
public static IOptionsSnapshot<LuceneDirectoryIndexOptions> GetOptions(string indexName, LuceneDirectoryIndexOptions options)
|
||||
=> Mock.Of<IOptionsSnapshot<LuceneDirectoryIndexOptions>>(x => x.Get(indexName) == options);
|
||||
public static IOptionsMonitor<LuceneDirectoryIndexOptions> GetOptions(string indexName, LuceneDirectoryIndexOptions options)
|
||||
=> Mock.Of<IOptionsMonitor<LuceneDirectoryIndexOptions>>(x => x.Get(indexName) == options);
|
||||
|
||||
internal void IndexingError(object sender, IndexingErrorEventArgs e) => throw new ApplicationException(e.Message, e.Exception);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
@@ -74,7 +74,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Examine.Lucene" Version="2.0.0-beta.154" />
|
||||
<PackageReference Include="Examine.Lucene" Version="2.0.0-beta.168" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
||||
|
||||
Reference in New Issue
Block a user