ReSharper File Layout for Explicit Interface Implementation
I'm trying to configure the File Layout of ReSharper in such a way that formatting the code does respect the 'StyleCop SA1202' rule.
See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md for more information.
Basically, this rule says that the order of elements is required to match a given pattern.
First 'Public', followed by 'Internal' ...
When I have a class that implements an interface explicit, it's in fact 'public'.
See the following code:
void IDisposable.Dispose()
{
// Implementation
}
When I configure ReSharper File Layout with the following configuration:
<Entry DisplayName="Methods">
<Entry.Match>
<Kind Is="Method" />
</Entry.Match>
<Entry.SortBy>
<Access Order="Public Internal Protected" />
</Entry.SortBy>
</Entry>
The explicit implemented interface is placed as the after any public methods.
Is there any way to configure ReSharper's File Layout so that rule SA1202 is respected when using explicit interface implementations?
Kind regards
Please sign in to leave a comment.