This project is read-only.
1
Vote

Coalesce, condition doesn't round-trip

description

Assuming the project hasn't been abandoned
and given following:
    class Row
    {
        public string Name { get; set; }
    }
 
... and:
   Expression<Func<Row,bool>> foo =
            r => ((r != null ? r.Name : null) ?? "").ToLower().Equals("c".ToLower());
 
... and this serializer:
        var assemblies = new[] { typeof(Row).Assembly, typeof(ExpressionType).Assembly, typeof(IQueryable).Assembly };
        var resolver = new TypeResolver(assemblies, typeof(Customer).Assembly.GetTypes());
        var knowntypeconverters = new[] { new KnownTypeExpressionXmlConverter(resolver)};
        var serializer = new ExpressionSerializer(resolver, knowntypeconverters);
 
It totally fails to deserialize what has been serialized. I fixed the type lookup in KnownTypeExpressionXmlConverter, but it fails down the road with coercion (?) complain.
 
Is there a way I configure the serializer so that it round-trips or it's just plain broken?

comments