How to group properties of a specific type in a region with ReSharper?

℡╲_俬逩灬. 提交于 2019-12-08 11:25:49

问题


I want to use the ReSharper File Layout tool to autoarange my class. With the default pattern it already works with most regions. Since I'm using Mvvm I use ICommands and Handlers. I want to group all commands in a own region like

#region Commands

public ICommand NavigateToSettingsView { get { return new RelayCommand(OnNavigateToSettingsView); } }
public ICommand NavigateToHistoryView { get { return new RelayCommand(OnNavigateToHistoryView); } }

#endregion

How can I tell ReSharper that it will group properties of the type ICommand into one region? It doesn't work with the option "Implements".

This is the last setting I tried:

<Region Name="Commands" Priority="150">
      <Entry DisplayName="Commands" Priority="150">
        <Entry.Match>
          <ImplementsInterface Immediate="True" Name="ICommand" />
        </Entry.Match>
      </Entry>
    </Region>

回答1:


According to the JetBrains support there is no way to do it! But maybe they will add that to the coming Resharper 9.2 release.



来源:https://stackoverflow.com/questions/31878293/how-to-group-properties-of-a-specific-type-in-a-region-with-resharper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!