Create Interface for Member and Content Index to use in Populators

This commit is contained in:
arkadiuszbiel
2019-10-24 09:55:41 +01:00
parent 0c5b832627
commit ffaf12c548
7 changed files with 28 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ namespace Umbraco.Examine
/// <summary>
/// Performs the data lookups required to rebuild a content index
/// </summary>
public class ContentIndexPopulator : IndexPopulator<UmbracoContentIndex>
public class ContentIndexPopulator : IndexPopulator<IUmbracoContentIndex>
{
private readonly IContentService _contentService;
private readonly IValueSetBuilder<IContent> _contentValueSetBuilder;

View File

@@ -0,0 +1,9 @@
using Examine;
namespace Umbraco.Examine
{
public interface IUmbracoContentIndex : IIndex
{
}
}

View File

@@ -0,0 +1,9 @@
using Examine;
namespace Umbraco.Examine
{
public interface IUmbracoMemberIndex : IIndex
{
}
}

View File

@@ -7,7 +7,7 @@ using Umbraco.Core.Services;
namespace Umbraco.Examine
{
public class MemberIndexPopulator : IndexPopulator<UmbracoMemberIndex>
public class MemberIndexPopulator : IndexPopulator<IUmbracoMemberIndex>
{
private readonly IMemberService _memberService;
private readonly IValueSetBuilder<IMember> _valueSetBuilder;

View File

@@ -64,10 +64,12 @@
<Compile Include="ExamineExtensions.cs" />
<Compile Include="IContentValueSetBuilder.cs" />
<Compile Include="IContentValueSetValidator.cs" />
<Compile Include="IUmbracoContentIndex.cs" />
<Compile Include="IUmbracoIndexConfig.cs" />
<Compile Include="IIndexCreator.cs" />
<Compile Include="IIndexDiagnostics.cs" />
<Compile Include="IIndexPopulator.cs" />
<Compile Include="IUmbracoMemberIndex.cs" />
<Compile Include="UmbracoIndexConfig.cs" />
<Compile Include="IndexPopulator.cs" />
<Compile Include="IndexRebuilder.cs" />

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Examine
/// <summary>
/// An indexer for Umbraco content and media
/// </summary>
public class UmbracoContentIndex : UmbracoExamineIndex
public class UmbracoContentIndex : UmbracoExamineIndex, IUmbracoContentIndex
{
public const string VariesByCultureFieldName = SpecialFieldPrefix + "VariesByCulture";
protected ILocalizationService LanguageService { get; }

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Examine
/// <summary>
/// Custom indexer for members
/// </summary>
public class UmbracoMemberIndex : UmbracoExamineIndex
public class UmbracoMemberIndex : UmbracoExamineIndex, IUmbracoMemberIndex
{
/// <summary>
/// Constructor to allow for creating an indexer at runtime