DeagleGross / SharpCoachPlugin

Rider C# plugin for easy code generation of mapping classes
MIT License
4 stars 2 forks source link

"Map internals of models" code fix does not appear on extension methods #23

Closed TonySkorik closed 1 year ago

TonySkorik commented 1 year ago

Describe the bug The "Map internals of models" code fix does not appear under the lightbulb menu when called on an extension method.

To Reproduce Steps to reproduce the behavior:

  1. Add a static instance method
    private static SomeOutputModel
        MapToResponse(SomeInputModel source)
    {}
  2. Observe that the lightbulb contains map internals of models code fix.
  3. Add this qualifier to the first formal parameter of the added method
    private static SomeOutputModel
        MapToResponse(this SomeInputModel source)
    {}
  4. Observe that the lightbulb does not contain "Map internals of models" code fix.

Expected behavior The map internals of models code fix should appear under the lightbulb menu when called on an extension method with compatible signature.

Screenshots Extension method behavior image

Behavior when this qualifier is removed from first formal parameter image

Desktop: