Giter VIP home page Giter VIP logo

Comments (8)

vsoldatkin avatar vsoldatkin commented on May 20, 2024

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.

esskar avatar esskar commented on May 20, 2024

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.

robert-gazsi avatar robert-gazsi commented on May 20, 2024

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.

edzatarin avatar edzatarin commented on May 20, 2024

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.

alkboda avatar alkboda commented on May 20, 2024

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.

vsoldatkin avatar vsoldatkin commented on May 20, 2024

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.

esskar avatar esskar commented on May 20, 2024

I also added a working WCF host/client example

from serialize.linq.

vsoldatkin avatar vsoldatkin commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.