Mark MemberService.GetMembersByPropertyValue() methods as obsolete (#20092)

This commit is contained in:
Laura Neto
2025-09-17 10:06:42 +02:00
committed by GitHub
parent b8b72dd9d3
commit cc6ce1e80f
2 changed files with 32 additions and 27 deletions

View File

@@ -385,6 +385,12 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
/// <remarks>
/// Instead of using this method, which queries the database directly, we advise using search (Examine).
/// You can configure an `IValueSetValidator` to ensure all the properties you need are indexed.
/// <see href="https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing#changing-ivaluesetvalidator" />
/// </remarks>
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
IEnumerable<IMember>? GetMembersByPropertyValue(
string propertyTypeAlias,
string value,
@@ -402,6 +408,12 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
/// <remarks>
/// Instead of using this method, which queries the database directly, we advise using search (Examine).
/// You can configure an `IValueSetValidator` to ensure all the properties you need are indexed.
/// <see href="https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing#changing-ivaluesetvalidator" />
/// </remarks>
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
/// <summary>
@@ -412,6 +424,12 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
/// <remarks>
/// Instead of using this method, which queries the database directly, we advise using search (Examine).
/// You can configure an `IValueSetValidator` to ensure all the properties you need are indexed.
/// <see href="https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing#changing-ivaluesetvalidator" />
/// </remarks>
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, bool value);
/// <summary>
@@ -426,6 +444,12 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
/// <remarks>
/// Instead of using this method, which queries the database directly, we advise using search (Examine).
/// You can configure an `IValueSetValidator` to ensure all the properties you need are indexed.
/// <see href="https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing#changing-ivaluesetvalidator" />
/// </remarks>
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
/// <summary>

View File

@@ -612,13 +612,8 @@ namespace Umbraco.Cms.Core.Services
return _memberRepository.GetPage(query, pageIndex, pageSize, out totalRecords, null, Ordering.By("LoginName"));
}
/// <summary>
/// Gets a list of Members based on a property search
/// </summary>
/// <param name="propertyTypeAlias">Alias of the PropertyType to search for</param>
/// <param name="value"><see cref="string"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
/// <inheritdoc />
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, string value, StringPropertyMatchType matchType = StringPropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
@@ -646,13 +641,8 @@ namespace Umbraco.Cms.Core.Services
return _memberRepository.Get(query);
}
/// <summary>
/// Gets a list of Members based on a property search
/// </summary>
/// <param name="propertyTypeAlias">Alias of the PropertyType to search for</param>
/// <param name="value"><see cref="int"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
/// <inheritdoc />
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
@@ -683,12 +673,8 @@ namespace Umbraco.Cms.Core.Services
return _memberRepository.Get(query);
}
/// <summary>
/// Gets a list of Members based on a property search
/// </summary>
/// <param name="propertyTypeAlias">Alias of the PropertyType to search for</param>
/// <param name="value"><see cref="bool"/> Value to match</param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
/// <inheritdoc />
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, bool value)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
@@ -698,13 +684,8 @@ namespace Umbraco.Cms.Core.Services
return _memberRepository.Get(query);
}
/// <summary>
/// Gets a list of Members based on a property search
/// </summary>
/// <param name="propertyTypeAlias">Alias of the PropertyType to search for</param>
/// <param name="value"><see cref="System.DateTime"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
/// <inheritdoc />
[Obsolete("Please use Search (Examine) instead, scheduled for removal in Umbraco 18.")]
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);