Grouping fields/methods/constructors into regions using Type Members Layout

Hi.

I'm trying to group my code into regions using Resharpers Type Members Layout. This works well for constructors. For methods and fields each of them is put in their own region.

Here is the code after I run the clean up:

Capture.PNG

This is the schema:

<?xml version="1.0" encoding="utf-8" ?>
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">
  <!--Default pattern-->
    <Pattern RemoveAllRegions="true">
  
    <!--Constructors. Place static one first-->
    <Entry>
      <Match>
        <Kind Is="constructor"/>
      </Match>
      <Sort>
        <Static/>
      </Sort>
      <Group>
        <Name Region="Constructors"/>
      </Group>
    </Entry>

    <Entry>
      <Match>
        <Kind Is="method"/>
      </Match>
      <Sort>
        <Static/>
      </Sort>
      <Group>
        <Name Region="Methods"/>
      </Group>
    </Entry>
  </Pattern>
</Patterns>

All ideas are appreciated.

Please sign in to leave a comment.