From bd8ad5f6f9ea3adcfc6b4668dac0a84db2bb61ac Mon Sep 17 00:00:00 2001 From: Nicklas Kramer Date: Fri, 22 Aug 2025 07:58:17 +0200 Subject: [PATCH] V17 - Removed obsoleted code from Umbraco.Examine (#19966) Removing obsoleted code from BackOfficeExamineSearcher.cs and dependencies --- .../BackOfficeExamineSearcher.cs | 64 ------------------- .../Examine/IBackOfficeExamineSearcher.cs | 25 +------- .../Examine/NoopBackOfficeExamineSearcher.cs | 2 + 3 files changed, 3 insertions(+), 88 deletions(-) diff --git a/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs b/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs index 02ac583f8c..8894a80cb4 100644 --- a/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs +++ b/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs @@ -48,70 +48,6 @@ public class BackOfficeExamineSearcher : IBackOfficeExamineSearcher _appCaches = appCaches; } - [Obsolete("Please use the non-obsolete constructor. Will be removed in V18.")] - public BackOfficeExamineSearcher( - IExamineManager examineManager, - ILocalizationService languageService, - IBackOfficeSecurityAccessor backOfficeSecurityAccessor, - IEntityService entityService, - IUmbracoTreeSearcherFields treeSearcherFields, - AppCaches appCaches, - IUmbracoMapper umbracoMapper, - IPublishedUrlProvider publishedUrlProvider) - : this( - examineManager, - StaticServiceProvider.Instance.GetRequiredService(), - backOfficeSecurityAccessor, - entityService, - treeSearcherFields, - appCaches) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V18.")] - public BackOfficeExamineSearcher( - IExamineManager examineManager, - ILocalizationService localizationService, - ILanguageService languageService, - IBackOfficeSecurityAccessor backOfficeSecurityAccessor, - IEntityService entityService, - IUmbracoTreeSearcherFields treeSearcherFields, - AppCaches appCaches, - IUmbracoMapper umbracoMapper, - IPublishedUrlProvider publishedUrlProvider) - : this( - examineManager, - languageService, - backOfficeSecurityAccessor, - entityService, - treeSearcherFields, - appCaches) - { - } - - [Obsolete("Please use the method that accepts all parameters. Will be removed in V17.")] - public IEnumerable Search( - string query, - UmbracoEntityTypes entityType, - int pageSize, - long pageIndex, - out long totalFound, - string? searchFrom = null, - bool ignoreUserStartNodes = false) - => Search(query, entityType, pageSize, pageIndex, out totalFound, null, null, searchFrom, ignoreUserStartNodes); - - [Obsolete("Please use the method that accepts all parameters. Will be removed in V17.")] - public IEnumerable Search( - string query, - UmbracoEntityTypes entityType, - int pageSize, - long pageIndex, - out long totalFound, - string[]? contentTypeAliases, - string? searchFrom = null, - bool ignoreUserStartNodes = false) - => Search(query, entityType, pageSize, pageIndex, out totalFound, contentTypeAliases, null, searchFrom, ignoreUserStartNodes); - public IEnumerable Search( string query, UmbracoEntityTypes entityType, diff --git a/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs b/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs index 1f840328a5..38b5cde1f3 100644 --- a/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs +++ b/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs @@ -8,28 +8,6 @@ namespace Umbraco.Cms.Infrastructure.Examine; /// public interface IBackOfficeExamineSearcher { - [Obsolete("Please use the method that accepts all parameters. Will be removed in V17.")] - IEnumerable Search( - string query, - UmbracoEntityTypes entityType, - int pageSize, - long pageIndex, - out long totalFound, - string? searchFrom = null, - bool ignoreUserStartNodes = false); - - [Obsolete("Please use the method that accepts all parameters. Will be removed in V17.")] - IEnumerable Search( - string query, - UmbracoEntityTypes entityType, - int pageSize, - long pageIndex, - out long totalFound, - string[]? contentTypeAliases, - string? searchFrom = null, - bool ignoreUserStartNodes = false) - => Search(query, entityType, pageSize, pageIndex, out totalFound, searchFrom, ignoreUserStartNodes); - // default implementation to avoid breaking changes falls back to old behaviour IEnumerable Search( string query, @@ -40,6 +18,5 @@ public interface IBackOfficeExamineSearcher string[]? contentTypeAliases, bool? trashed, string? searchFrom = null, - bool ignoreUserStartNodes = false) - => Search(query, entityType, pageSize, pageIndex, out totalFound, null, searchFrom, ignoreUserStartNodes); + bool ignoreUserStartNodes = false); } diff --git a/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs b/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs index 625a0fda53..c77c9436e7 100644 --- a/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs +++ b/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs @@ -11,6 +11,8 @@ public class NoopBackOfficeExamineSearcher : IBackOfficeExamineSearcher int pageSize, long pageIndex, out long totalFound, + string[]? contentTypeAliases, + bool? trashed, string? searchFrom = null, bool ignoreUserStartNodes = false) {