Closed
Description
Well, I have several custom expression types with overridden ToString()
and ReadableExpressions shows only property name for some reason.
Simple reproducing sample:
class Program
{
class TestClass
{
public int Id { get; set; }
}
class TestExpression : Expression
{
private readonly Type _type;
public TestExpression(Type type)
{
_type = type;
}
public override string ToString()
{
return "Ref(TableContext_1(26)(T: 27))";
}
public override Type Type => _type;
public override ExpressionType NodeType => ExpressionType.Extension;
}
public static void Main(string[] args)
{
var testExpression = new TestExpression(typeof(TestClass));
// try to visualize the following:
var propAccess = Expression.Property(testExpression, "Id");
}
}