Open
Description
Given that we already have ToLambaExpression
and after #271 we will have ToLightExpression
.
Now we have possibility to convert the Light Expression from and to the System Expression.
The missing link is the ability to compare the restored expression.
This issue should address it.
Update
For now, we may compare the expressions converted to the C# code (which is not optimal):
#if LIGHT_EXPRESSION
var sysExpr = expr.ToLambdaExpression();
var restoredExpr = sysExpr.ToLightExpression();
// todo: @feature #431 compare the restored target and source expressions directly instead of strings
Assert.AreEqual(expr.ToCSharpString(), restoredExpr.ToCSharpString());
#endif
Update:
Take into account that when comparing the generated C# code, the generated names may be different based on the new expression identities. Because currently AppendName
provides the unique name suffix based on the expression.GetHashCode()