如何让 ReSharper 停止在我的 MSpec 成员上放置显式访问修饰符?
我正在使用 Machine.Specifications,我对 VS2010/Resharper 不断尝试格式化我的代码感到非常恼火...例如:
Establish context = () => the_cartoon_repository = DependencyOf<INHibernateRepository<Cartoon>>();
就会变成:
private Establish context = () => the_cartoon_repository = DependencyOf<INHibernateRepository<Cartoon>>();
一旦我按 Enter 键, 。啊!一定有办法解决这个问题,不是吗?
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<INHibernateRepository<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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ReSharper 选项 >语言> C#>其他>修饰符:
取消选中
使用显式私有修饰符
。ReSharper options > Laguages > C# > Other > Modifiers:
Uncheck the
Use explicit private modifier
.MSpec 的作者 Aaron Jensen 在 这篇文章。具体来说,
The author of MSpec, Aaron Jensen, addresses a few formatting issues in this post. Specifically,