CNeptune icon indicating copy to clipboard operation
CNeptune copied to clipboard

Roadmap

Open Puresharper opened this issue 7 years ago • 0 comments

Interception

Virtual method : change virtual interception to match with virtual pattern and always wrap entire virtual call (in progress)

public class A
{
    virtual public void Method()
    {
        Console.WriteLine("A");
    }
}

public class B : A
{
    override public void Method()
    {
        Console.WriteLine("B");
        base.Method();
    }
}

Without tweak, calling 'B.Method()' will produce

B
A

If 'A.Method()' is replaced by a method that call 'Console.WrireLine("C")' before original code, it will produce

B
C
A

The virtual pattern should produce

C
B
A

Generic method : change generic interception to wrap generic definition call into parameterized generic call.

public class A
{
    public void Method<T>()
    {
        Console.WriteLine("A");
    }
}

Without tweak it will produce when calling 'A.Method()'

A

If 'A.Method()' is replaced by a method that call Console.WriteLine("B") before original code, it will produce

B
A

If 'A.Method<>()' is replaced by a method that call 'Console.WriteLine("C")' before original code, it will produce

B
A

It is explain by 'A.Method()' make the last decision. Respecting generic method definition should produce

B
C
A

Helper

  • high speed static method to create and uninitialized inetance of non abstract class.
  • high speed serialization/deserialization template
  • external virtual dispatch using visitor pattern

Usage

  • method registration : a nested class contains a pointer for redirection with default pointer on original code and need a method to help to convert methodinfo to pointer. (done)
  • generic method definition registration : parameterized/closed generic methods are treated like non generic method but in some case it can be good to register directly the generic method definition.
  • add a way to get the methodinfo that execute user code from visible method. (in progress)
  • list all injected methods

Integration

  • Create the associated nuget package (done)
  • Make rewriter idempotent (done)
  • Detect real assembly extension to support .exe (done)

Administration

  • Create an administration nuget package
  • Interface for direct usage
  • Additional explicit interfaces
  • Additional private fields
  • Modules & Classes trigger?

Puresharper avatar Mar 21 '17 09:03 Puresharper