开发者

How do I get ReSharper to stop placing explicit access modifiers on my MSpec members?

开发者 https://www.devze.com 2023-03-14 08:20 出处:网络
I\'m using Machine.Specifications and I\'m really annoyed by how VS2010/Resharper keeps trying to format my code... for example:

I'm using Machine.Specifications and I'm really annoyed by how VS2010/Resharper keeps trying to format my code... for example:

Establish context = () => the_cartoon_repository = DependencyOf<I开发者_JAVA技巧NHibernateRepository<Cartoon>>();

Gets turned into:

private Establish context = () => the_cartoon_repository = DependencyOf<INHibernateRepository<Cartoon>>();

As soon as I press enter. Argh! There's got to be a way around this, no?


ReSharper options > Laguages > C# > Other > Modifiers:

Uncheck the Use explicit private modifier.


The author of MSpec, Aaron Jensen, addresses a few formatting issues in this post. Specifically,

  • explicit private modifiers
  • weird lambda indentation
  • field naming warnings
0

精彩评论

暂无评论...
验证码 换一张
取 消