refactor based on shannon comments

This commit is contained in:
arkadiuszbiel
2019-10-10 15:50:00 +02:00
parent 1ca35b2fbb
commit 511751d147
4 changed files with 13 additions and 13 deletions

View File

@@ -2,11 +2,11 @@ using Examine;
namespace Umbraco.Examine
{
public abstract class IUmbracoIndexConfig
public interface IUmbracoIndexConfig
{
public abstract IContentValueSetValidator GetContentValueSetValidator();
public abstract IContentValueSetValidator GetPublishedContentValueSetValidator();
public abstract IValueSetValidator GetMemberValueSetValidator();
IContentValueSetValidator GetContentValueSetValidator();
IContentValueSetValidator GetPublishedContentValueSetValidator();
IValueSetValidator GetMemberValueSetValidator();
}
}

View File

@@ -68,7 +68,7 @@
<Compile Include="IIndexCreator.cs" />
<Compile Include="IIndexDiagnostics.cs" />
<Compile Include="IIndexPopulator.cs" />
<Compile Include="UmbracoUmbracoIndexConfig.cs" />
<Compile Include="UmbracoIndexConfig.cs" />
<Compile Include="IndexPopulator.cs" />
<Compile Include="IndexRebuilder.cs" />
<Compile Include="IPublishedContentValueSetBuilder.cs" />

View File

@@ -4,20 +4,20 @@ using Umbraco.Core.Services.Implement;
namespace Umbraco.Examine
{
public class UmbracoUmbracoIndexConfig : IUmbracoIndexConfig
public class UmbracoIndexConfig : IUmbracoIndexConfig
{
public UmbracoUmbracoIndexConfig(IPublicAccessService publicAccessService)
public UmbracoIndexConfig(IPublicAccessService publicAccessService)
{
PublicAccessService = publicAccessService;
}
protected IPublicAccessService PublicAccessService { get; }
public override IContentValueSetValidator GetContentValueSetValidator()
public IContentValueSetValidator GetContentValueSetValidator()
{
return new ContentValueSetValidator(false, true, PublicAccessService);
}
public override IContentValueSetValidator GetPublishedContentValueSetValidator()
public IContentValueSetValidator GetPublishedContentValueSetValidator()
{
return new ContentValueSetValidator(true, false, PublicAccessService);
}
@@ -26,7 +26,7 @@ namespace Umbraco.Examine
/// Returns the <see cref="IValueSetValidator"/> for the member indexer
/// </summary>
/// <returns></returns>
public override IValueSetValidator GetMemberValueSetValidator()
public IValueSetValidator GetMemberValueSetValidator()
{
return new MemberValueSetValidator();
}

View File

@@ -88,12 +88,12 @@ namespace Umbraco.Web.Search
);
return index;
}
[Obsolete]
[Obsolete("This method should not be used and will be removed in future versions. GetContentValueSetValidator was moved to IUmbracoIndexConfig")]
public virtual IContentValueSetValidator GetContentValueSetValidator()
{
return UmbracoIndexConfig.GetContentValueSetValidator();
}
[Obsolete]
[Obsolete("This method should not be used and will be removed in future versions. GetPublishedContentValueSetValidator was moved to IUmbracoIndexConfig")]
public virtual IContentValueSetValidator GetPublishedContentValueSetValidator()
{
return UmbracoIndexConfig.GetPublishedContentValueSetValidator();
@@ -103,7 +103,7 @@ namespace Umbraco.Web.Search
/// Returns the <see cref="IValueSetValidator"/> for the member indexer
/// </summary>
/// <returns></returns>
[Obsolete]
[Obsolete("This method should not be used and will be removed in future versions. GetMemberValueSetValidator was moved to IUmbracoIndexConfig")]
public virtual IValueSetValidator GetMemberValueSetValidator()
{
return UmbracoIndexConfig.GetMemberValueSetValidator();