Comments (8)
Seems like you need to ensure your client proxy uses Serialize.Linq classes, not their auto-generated proxies like ExpressionNodeOfNewExpressionQsd8_SODT. Personally I'm trying to aviod using auto-generated stuff for WCF when possible.
That was just an educated guess. Either way I need to look at the code to suggest something.
from serialize.linq.
Hi @robert-gazsi , thanks for your post. This looks similar to the issue that was discussed in #23 . To be honest, i never used the auto-generator. But let me have a look if the auto-generation can be improved somehow.
from serialize.linq.
You have a good point by not using the VS auto-generated proxy and in fact I just did that after I posted the issue. Even though I had reused this assembly reference on the client as well, some part of it was still being auto-generated in the proxy data contract.
But probably there will be other potential users who might just go ahead with the auto-generated one, and in this case it's better to see what can be done.
Thanks for your help and good work!
from serialize.linq.
hi guys,
i had the same problem to esskar, and i dont know to solve it. Everytime that i update my reference, seem the erros, 13 in total, like ....ExpressionNodeOfNewExpressionQsd8_SODT does not implement inherited abstract member...
How do i to solve it?
thanks in advance and sorry for my bad english.
from serialize.linq.
Hi! Great library and good idea to replace linq expressions to something what could be serialized.
I got same problem as other. So I simply will wait for fix and at this time using that code(maybe anybody will find it useful):
namespace {ProjectName}.{ServiceReferenceName}
{
// #27
public partial class ExpressionNodeOfUnaryExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfBinaryExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfTypeBinaryExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfLambdaExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfParameterExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfListInitExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfNewArrayExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfConstantExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfMethodCallExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfInvocationExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfConditionalExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfMemberExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfMemberInitExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
public partial class ExpressionNodeOfNewExpressionQsd8_SODT
{
public override System.Linq.Expressions.Expression ToExpression(Serialize.Linq.ExpressionContext context)
{
throw new NotImplementedException();
}
}
}
from serialize.linq.
This issue comes from a presence of generic types in the expression nodes hierarchy. Seems like VS code generator cannot reuse them properly while importing service reference. There is also a related bug: every type with non-standard DataContract name cannot be reused by default. Which is particularly noticeable with SERIALIZE_LINQ_OPTIMIZE_SIZE option.
So, in conclusion: Do not use auto-generated clients to work with Serialize.Linq. Data contracts will be all messed up.
Provide a manual WCF client implementation for the service.
There is nothing esskar can fix here without rebuilding all the data contract hierarchy to get rid of the generics and custom data contract names.
from serialize.linq.
I also added a working WCF host/client example
from serialize.linq.
I see, it appears that only generic types cannot be reused. Other types with custom data contract names are reused just fine.
There are still trash definitions (see Reference.cs in the WcfClientWithServiceReference app) like
public partial class tE : Serialize.Linq.Nodes.ExpressionNode, ...
// tE stands for ExpressionNode`1
But they are not causing problems any more.
The only potential issue I see is that client can break service request deserialization logic by sending him an instance of tE instead of a normal ExpressionNode.
from serialize.linq.
Related Issues (20)
- bug when using expressions that contain dynamic HOT 1
- Question on LambdaExpression serialization HOT 1
- .net 5.0 problem HOT 2
- Serialize expression when it is a property of a class? HOT 2
- Cannot Serialize Expression Converted From Func HOT 3
- How to Revice Post arguments in core 3.1
- Change of License HOT 6
- Expression.Default not supported in serialization HOT 2
- Question about deserialization security: HOT 1
- Need your help with other issue HOT 2
- "System.InvalidOperationException: Sequence contains no matching element" during SerializeText HOT 1
- Known type cannot be an interface
- Error converting type: Bug or implementation issue - please help HOT 3
- Undefined variable error when using ToString in lambda expression HOT 2
- Deploy the latest build to NuGet HOT 3
- Serialize Linq Expression not working - Workaround / Suggestion HOT 2
- Target framework net standard 2.0 & 2.1 HOT 3
- Changes from 2.x to 3.x HOT 1
- Error when serializing an expression with nested method calls
- Method serialization issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serialize.linq.