ReSharper custom pattern ambiguous with multiple member definitions

蓝咒 提交于 2019-12-23 07:48:06

问题


I am attempting to transform eager class instantiation to lazy instantiation. I've followed the eager pattern throughout the codebase, but now want to change it to the lazy alternative (and remove the setter while I'm at it). ReSharper's custom pattern find/replace seems like the perfect tool for this.

Happy

If I have private.... by itself, the pattern searches fine.

If I have public.... by itself, the pattern searches fine.

Sad

As soon as I try to combine the two lines, it fails with "pattern is ambiguous"

Unknown??

If it helps, when I have the private... line and paste in the second blip, the auto-placeholder mechanism fails to do anything with $name$. Again, both segments work perfectly by themselves. I'm at a loss.

Note: There is analogous behavior in the "replace" box, which is why I'm largely ignoring it in my description of the problem.

Update 12/11/2015

I tried this in ReSharper 10 (Ultimate) and I get the same failing behavior.

Update 9/8/2016

Latest test in "ReSharper Ultimate 2016.1.2" still fails.

来源:https://stackoverflow.com/questions/34210827/resharper-custom-pattern-ambiguous-with-multiple-member-definitions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!