如何使用ReSharper对区域中特定类型的属性进行分组? [英] How to group properties of a specific type in a region with ReSharper?
问题描述
我想使用ReSharper文件布局工具来自动安排班级.使用默认模式,它已经适用于大多数区域.由于我使用的是Mvvm,因此我使用的是ICommands和Handlers.我想将所有命令分组在一个自己的区域中,例如
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
如何告诉ReSharper将ICommand类型的属性分组到一个区域中?不适用于实施"选项.
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>
推荐答案
根据JetBrains的支持,无法做到这一点! 但是也许他们会将其添加到即将发布的Resharper 9.2版本中.
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.
这篇关于如何使用ReSharper对区域中特定类型的属性进行分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!