Skip to content

Commit

Permalink
Engine: Modernize and clean up value expression type ValueExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethmyhra committed Feb 6, 2025
1 parent e9e7d9c commit 8401b64
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Spark.Engine/Search/ValueExpressionTypes/ValueExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ public abstract class ValueExpression : Expression
{
public string ToUnescapedString()
{
var value = this;
if (value is UntypedValue untyped)
{
value = untyped.AsStringValue();
ValueExpression value = this;
if (value is not UntypedValue untyped)
return value.ToString();

return StringValue.UnescapeString(value.ToString());
}
return value.ToString();
value = untyped.AsStringValue();
return StringValue.UnescapeString(value.ToString());
}
}

0 comments on commit 8401b64

Please sign in to comment.