更改 resharper 设置以适应 mspec 编码
当我创建如下所示的新测试时:
它 should_get_something = () => foo();
当我点击分号 resharper 时,将 private 粘贴在委托的前面:
Private It should_get_something = () => foo();
然后我必须将其删除。
我可以告诉 resharper 不要这样做吗?我尝试在命名样式对话框中添加一条规则,选择 Machine.Specifications.It 并取消选中 Private,但这没有效果。
When I create a new test like the following:
It should_get_something = () => foo();
When I hit the semi-colon resharper sticks private on the front of the delegate:
Private It should_get_something = () => foo();
I then have to remove it.
Can I tell resharper not to do this? I tried adding a rule to the naming style dialog selecting Machine.Specifications.It and unchecking Private but this had no effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一般来说,我建议像 Aaron 建议的那样设置 ReSharper 此处。
In general I recommend to set up ReSharper like Aaron has suggested here.
严格来说,这并不是您要问的问题,但您应该看看 这个也是如此。
Not strictly what you're asking about, but you should a look at this too.
是的,您可以阻止 Resharper 强制您使用显式私有修饰符。只需在此处取消选中“使用显式私有修饰符”即可:
Resharper - 选项 - 语言 - C# - 其他 - 修饰符
Yes, you can stop Resharper forcing you to use explicit private modifier. Just untick "use explicit private modifier" here:
Resharper - Options - Languages - C# - Other - Modifier