Skip to content

Commit 468e7eb

Browse files
authored
Handle boxing uniformly (#39)
Handle boxing properly
1 parent 6a2e6a7 commit 468e7eb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/ConductorSharp.Engine/Util/ExpressionUtil.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,9 @@ private static object ParseExpression(Expression expression)
3636
if (expression is ConstantExpression cex)
3737
return ParseConstantExpression(cex);
3838

39-
if (expression is UnaryExpression uex && uex.Operand is ConstantExpression ccex)
40-
{
41-
var converted = Convert.ToString(ccex.Value);
42-
43-
//if (ccex.Value is bool)
44-
// return converted.ToLowerInvariant();
45-
46-
return ccex.Value;
47-
}
48-
4939
// Handle boxing
5040
if (expression is UnaryExpression unaryEx && unaryEx.NodeType == ExpressionType.Convert)
51-
return CreateExpressionString(unaryEx.Operand);
41+
return ParseExpression(unaryEx.Operand);
5242

5343
if (
5444
expression is MethodCallExpression methodExpression

0 commit comments

Comments
 (0)