Coder Social home page Coder Social logo

Comments (5)

dr4cul4 avatar dr4cul4 commented on June 15, 2024

Unfortunately first delegate (public delegate TResult Func<T1, TResult>(T1 arg1);) also breaks the assembly, but in a different way.

When attempting to obfuscate assembly you get a index out of range. Commenting out this delegate solves the problem.

In my opinion tempering with delegates should be avoided.

from cneptune.

Puresharper avatar Puresharper commented on June 15, 2024

Hi, sorry it is under development and currently unstable.
Thank you for sharing this issue, It just means that I have to ignore some kind of class like delegate.

Original code is just moved into nested class named Neptune and is hidden for dnSpy/ILSpy by a side effect. Indeed, methods ared marked with DebuggerHiddenAttribute and GeneratedCodeAttribute.

I am working on a capacity to redirect call to DynamicMethod to grant skipVisibilityCheck without too much overhead and keeping generic support (even if DynamicMethod cannot be generic). This is why code can change a lot before first release that coming very soon (maybe in few hours if I can save time to work on).

Thank to you, I added a filter to skip delegates while tuning classes.

Next step will be to publish associated nuget package and adapt NConcern as first consumer of CNeptune.

from cneptune.

dr4cul4 avatar dr4cul4 commented on June 15, 2024

Unfortunately latest version also crashes at similar place, namely Program.cs line 355 with the same exception as before.

from cneptune.

dr4cul4 avatar dr4cul4 commented on June 15, 2024

Maybe checking if type is inherited from System.Delegate and filtering it out would solve this issue

from cneptune.

Puresharper avatar Puresharper commented on June 15, 2024

Hi,

I just tested it and it seems that delegate by-pass failed, so I changed it from

type.BaseType == type.Module.Import(typeof(MulticastDelegate));

to

(type.BaseType != null && type.BaseType.Resolve() == type.Module.Import(typeof(MulticastDelegate)).Resolve());

delegate by-pass correction
nuget package will be updated asap (1.0.4) to include this change.

from cneptune.

Related Issues (18)

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.