generate interface members explicitly *by default*

Small gripes with interfaces:

  • when generating members of an interface, the "Implement missing members" window always opens with the drop-down on "Implement as: Public Members".
    The tantalizing "Options" button brings me to the Code Editing > Members Generation option page, but no default for interface members is offered, only options for member/property body style defaults etc.
    I wish an "Generated interface members default style" option existed, or at least that the dropdown would remember my last selection.
  • to aggravate this, if the interface only has a single member, the window doesn't show up, so no way to choose explicit style (I know I can refactor from implicit to explicit after the fact, but still).
  • very minor formatting issue: our convention is to have multiple base types each on its own line, with the comma on the next line (so you can easily comment it out)... I'd like the comma to align on the ":" of the base type, but for some reason the formatter adds 2 extra spaces, like so:
3
2 comments

This also annoys me a lot and it seems like such a small feature to implement. I always use explicit and when I implement one missing member I have to remember to change it from public to implicit.

0

Hello everyone! Please feel free to comment or vote for https://youtrack.jetbrains.com/issue/RSRP-470278 to track status changes.

Benoit FOULETIER, as for the formatting issue - you need to configure the following options:

- ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | General | Prefer wrap before

- ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Arrangements of type parameters, constraints and base types | Wrap extends/implements list | Chop always

- ReSharper | Options | Code Editing | C# | Formatting Style | Tabs, Indents, Alignment | Align multiline constructs | List of base classes and interfaces

- ReSharper | Options | Code Editing | C# | Formatting Style | Tabs, Indents, Alignment | Align multiline constructs | Outdent commas

I would like to let you know that there is an option that automatically detects options from the selected code: https://www.jetbrains.com/help/resharper/Enforcing_Code_Formatting_Rules.html#formatting-rules-from-existing-code

0

Please sign in to leave a comment.