I want to use ReSharper feature: Code Inspection
→ Custom Patterns
to enforce using a certain base class.
This is how my pattern looks like:
(Please ignore the “UI glitch” — I had to work around another problem)
The problem is the content of the class. I’d like that have a placeholder which accepts any class content. However, such a placeholder does not exist:
No matter what I try, the content of the class is always lost when I apply the pattern. Is there any solution?
I know I can use a Find
pattern instead of Replace
, but then I have no auto-fix options. That is not what I want…
1