Skip to content

Commit

Permalink
Improve MemberName resolution (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin authored Jul 2, 2024
1 parent b239c1a commit e6a2602
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Immediate.Validations.Shared/ValidationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ private static object GetTargetObject(Expression? expression) =>
PrependMemberParent(GetMemberName(mce.Object, targetObject), $"{ExpressionEvaluator.GetValue(arg)}", MemberIndex.Index),
MethodCallExpression { Arguments.Count: 0 } mce =>
PrependMemberParent(GetMemberName(mce.Object, targetObject) ?? "", mce.Method.Name, MemberIndex.Method),
UnaryExpression { NodeType: ExpressionType.Convert or ExpressionType.ConvertChecked } ue =>
GetMemberName(ue.Operand, targetObject),
_ => null,
};

Expand Down

0 comments on commit e6a2602

Please sign in to comment.