Code Monkey home page Code Monkey logo

Comments (6)

tonerdo avatar tonerdo commented on May 22, 2024 5

Hey @johnkoerner. Thanks for reporting these issues. Most of these problems is as a result of incorrect MSIL generated during the rewriting of a method. I'm currently working on an under the hood re-implementation of Pose that replaces IL generation with Expression Trees which should fix most of the issues with Pose as well as open up more features like breakpoint support etc.

This re-implementation should be rolling out in about a week or two, but in the meantime I'll take a look at fixing this issue.

from pose.

ForNeVeR avatar ForNeVeR commented on May 22, 2024 3

@tonerdo we, as a community, are looking forward to see the new implementation! If you need any help, feel free to ask.

from pose.

johnkoerner avatar johnkoerner commented on May 22, 2024 1

Thanks for the update @tonerdo . When you feel it is ready, let me know and I can pull a branch and build it to test it out.

from pose.

johnkoerner avatar johnkoerner commented on May 22, 2024

This may be related to #11 as the stack traces are similar.

from pose.

SamerAdra avatar SamerAdra commented on May 22, 2024

Any update on the new implementation? I am getting this same exception when trying to use Pose in conjunction with Moq.

from pose.

DaleStan avatar DaleStan commented on May 22, 2024

I believe I'm experiencing this exception too. For me, changing the last line of GetRuntimeMethodForVirtual, in StubHelper.cs, to

return type.GetMethod(methodInfo.Name, bindingFlags, null, types, null) ??
    type.GetMethod($"{methodInfo.DeclaringType.FullName}.{methodInfo.Name}", BindingFlags.Instance | BindingFlags.NonPublic, null, types, null);

did the trick.

My analysis is that, without this change, GetRuntimeMethodForVirtual does not know how to handle explicit interface implementations.

VB.NET's Implements keyword may cause similar problems; I've never checked out what they look like under the hood.

from pose.

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.