Fix FurthestAncestorOrSelfDynamicRootQueryStep and FurthestDescendantOrSelfDynamicRootQueryStep (#15113)
* Rename FarthestDescendantOrSelfDynamicRootQueryStep to FurthestDescendantOrSelfDynamicRootQueryStep * Rename FarthestAncestorOrSelfDynamicRootQueryStep to FurthestAncestorOrSelfDynamicRootQueryStep * Update integration test and repo
This commit is contained in:
committed by
GitHub
parent
913f48806a
commit
c0ca4685e8
@@ -4,18 +4,18 @@ using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.DynamicRoot.QuerySteps;
|
||||
|
||||
public class FarthestAncestorOrSelfDynamicRootQueryStep : IDynamicRootQueryStep
|
||||
public class FurthestAncestorOrSelfDynamicRootQueryStep : IDynamicRootQueryStep
|
||||
{
|
||||
private readonly ICoreScopeProvider _scopeProvider;
|
||||
private readonly IDynamicRootRepository _nodeFilterRepository;
|
||||
|
||||
public FarthestAncestorOrSelfDynamicRootQueryStep(ICoreScopeProvider scopeProvider, IDynamicRootRepository nodeFilterRepository)
|
||||
public FurthestAncestorOrSelfDynamicRootQueryStep(ICoreScopeProvider scopeProvider, IDynamicRootRepository nodeFilterRepository)
|
||||
{
|
||||
_scopeProvider = scopeProvider;
|
||||
_nodeFilterRepository = nodeFilterRepository;
|
||||
}
|
||||
|
||||
protected virtual string SupportedDirectionAlias { get; set; } = "FarthestAncestorOrSelf";
|
||||
protected virtual string SupportedDirectionAlias { get; set; } = "FurthestAncestorOrSelf";
|
||||
|
||||
public async Task<Attempt<ICollection<Guid>>> ExecuteAsync(ICollection<Guid> origins, DynamicRootQueryStep filter)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ public class FarthestAncestorOrSelfDynamicRootQueryStep : IDynamicRootQueryStep
|
||||
}
|
||||
|
||||
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
|
||||
var result = (await _nodeFilterRepository.FarthestAncestorOrSelfAsync(origins, filter))?.ToSingleItemCollection() ?? Array.Empty<Guid>();
|
||||
var result = (await _nodeFilterRepository.FurthestAncestorOrSelfAsync(origins, filter))?.ToSingleItemCollection() ?? Array.Empty<Guid>();
|
||||
|
||||
return Attempt<ICollection<Guid>>.Succeed(result);
|
||||
}
|
||||
@@ -2,18 +2,18 @@ using Umbraco.Cms.Core.Scoping;
|
||||
|
||||
namespace Umbraco.Cms.Core.DynamicRoot.QuerySteps;
|
||||
|
||||
public class FarthestDescendantOrSelfDynamicRootQueryStep : IDynamicRootQueryStep
|
||||
public class FurthestDescendantOrSelfDynamicRootQueryStep : IDynamicRootQueryStep
|
||||
{
|
||||
private readonly ICoreScopeProvider _scopeProvider;
|
||||
private readonly IDynamicRootRepository _nodeFilterRepository;
|
||||
|
||||
public FarthestDescendantOrSelfDynamicRootQueryStep(ICoreScopeProvider scopeProvider, IDynamicRootRepository nodeFilterRepository)
|
||||
public FurthestDescendantOrSelfDynamicRootQueryStep(ICoreScopeProvider scopeProvider, IDynamicRootRepository nodeFilterRepository)
|
||||
{
|
||||
_scopeProvider = scopeProvider;
|
||||
_nodeFilterRepository = nodeFilterRepository;
|
||||
}
|
||||
|
||||
protected virtual string SupportedDirectionAlias { get; set; } = "FarthestDescendantOrSelf";
|
||||
protected virtual string SupportedDirectionAlias { get; set; } = "FurthestDescendantOrSelf";
|
||||
|
||||
public async Task<Attempt<ICollection<Guid>>> ExecuteAsync(ICollection<Guid> origins, DynamicRootQueryStep filter)
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class FarthestDescendantOrSelfDynamicRootQueryStep : IDynamicRootQuerySte
|
||||
}
|
||||
|
||||
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
|
||||
var result = await _nodeFilterRepository.FarthestDescendantOrSelfAsync(origins, filter);
|
||||
var result = await _nodeFilterRepository.FurthestDescendantOrSelfAsync(origins, filter);
|
||||
|
||||
return Attempt<ICollection<Guid>>.Succeed(result);
|
||||
}
|
||||
@@ -4,9 +4,9 @@ public interface IDynamicRootRepository
|
||||
{
|
||||
Task<Guid?> NearestAncestorOrSelfAsync(IEnumerable<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
|
||||
Task<Guid?> FarthestAncestorOrSelfAsync(IEnumerable<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
Task<Guid?> FurthestAncestorOrSelfAsync(IEnumerable<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
|
||||
Task<ICollection<Guid>> NearestDescendantOrSelfAsync(ICollection<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
|
||||
Task<ICollection<Guid>> FarthestDescendantOrSelfAsync(ICollection<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
Task<ICollection<Guid>> FurthestDescendantOrSelfAsync(ICollection<Guid> origins, DynamicRootQueryStep queryStep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user