Code Cleanup - Events

I seem to be having issues with the Code Cleanup function in R# 7.1. I'm trying to palce events above properties (because of a company StyleCop rule), and Code Cleanup is ignoring my events specification in the Type Members Layout.

Here is the relevant portion of my Type Members Layout:

       ...
       <Name/>
      </Sort>
    </Entry>

    <!--events-->
    <Entry>
      <Match>
        <Kind Is="event"/>
      </Match>
      <Sort>
        <Name/>
      </Sort>
    </Entry>

    <!--properties-->
    <Entry>
      <Match>
          <Kind Is="property"/>
      </Match>
    </Entry>

    <!--Constructors. Place static one first-->
    <Entry>
      <Match>
      ...

This is the code I'm expecting it to reformat:

        public string Name
        {
            get
            { this.name; }
            set
            {
                this.name = value;
                this.RaisePropertyChanged();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

However, whenever I run code cleanup, the event is not moved above the property. All other Type Member Layout options are applied (as near as I can tell), but not this one. I experimented a bit, moving both <Entry>...</Entry> elements around, and it looks like the event one is just being ignored. Am I missing a setting, misunderstanding what 'Kind Is="event"' refers to, or am I dealing with a bug?

Please sign in to leave a comment.