Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Prevent ReSharper from Adding Regions to Interfaces

This is really a corollary to a post by Kyle Baley a while back.

Despite my original love affair with regions some years back, that are nothing but noise to me now. Unfortunately, the default behavior of R# is wraps interface implementations in a region. I can understand where this might be helpful, but 90% of the time (in my experience) it is not .

I made a couple of half-hearted attempts to turn it off. It is not obvious in the least. After learning how from Kyle's post though, I thought I'd outline the exact steps.

  • Go to ReSharper | Options
  • In the left explorer pane, find Language | C# | Formatting Style | Type Members Layout
  • Uncheck "Use Default Patterns"
  • A huge nasty XML document appears. As Kyle mentions, Don't Panic.
  • Around line 162 is a section marked by <!--interface implementations-->
  • Within <entry />, remove:
<Group>
    <ImplementsInterface Immediate="true" 
                         Region="${ImplementsInterface} Members"/>
</Group>

Here's the screen shot.

Turning off regions for interfaces in ReShaper

Now you are good to go!


Posted 10-27-2008 1:04 AM by Christopher Bennage
Filed under: ,

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)