Skip to content

Commit ed10470

Browse files
committed
Logic in the LinksItselfConstantToSelfReferenceResolver simplified.
1 parent d047063 commit ed10470

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

Platform.Data.Doublets/Decorators/LinksItselfConstantToSelfReferenceResolver.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@ public override TLink Each(Func<IList<TLink>, TLink> handler, IList<TLink> restr
1818
{
1919
var constants = Constants;
2020
var itselfConstant = constants.Itself;
21-
var indexPartConstant = constants.IndexPart;
22-
var sourcePartConstant = constants.SourcePart;
23-
var targetPartConstant = constants.TargetPart;
24-
var restrictionsCount = restrictions.Count;
25-
if (!_equalityComparer.Equals(constants.Any, itselfConstant)
26-
&& (((restrictionsCount > indexPartConstant) && _equalityComparer.Equals(restrictions[indexPartConstant], itselfConstant))
27-
|| ((restrictionsCount > sourcePartConstant) && _equalityComparer.Equals(restrictions[sourcePartConstant], itselfConstant))
28-
|| ((restrictionsCount > targetPartConstant) && _equalityComparer.Equals(restrictions[targetPartConstant], itselfConstant))))
21+
if (!_equalityComparer.Equals(constants.Any, itselfConstant) && restrictions.Contains(itselfConstant))
2922
{
3023
// Itself constant is not supported for Each method right now, skipping execution
3124
return constants.Continue;

0 commit comments

Comments
 (0)