Need Help with custom pattern for VB.NET

Hi, I am new to ReSharper and currently playing around with custom patterns for code inspection.

I have attached a screenshot which shows details. On the top of the screenshot you can find a 
‘AddHandler’ statement which uses direct implementation.

The ReSharper custom pattern should detect such implementations and notify the developers to use an ‘AddressOf’ pattern instead.

The custom pattern can be saved, but no error is raised during code inspection. I guess I have to use a different approach for 
the placeholders but wasn't able to figure out what exactly I have to change.

Any help is very much appreciated.


 

0
2 comments

Hello Andreas,

I'd suggest changing $eventtype$ for PropertyChanged to $event$ which is an expression placeholder. This should help:

0

Hello Angelina,

works like a charm! Thanks very much for your answer!

Kind regards
Andreas

0

Please sign in to leave a comment.