Pattern Catalog item not matching

I just created my first pattern (see attached XML), and it's not matching what I expect.

I want it to match the following code:

            _config.CheckInProcessId = LookupManager.GetIdForName(LookupList.Processes,
                                                                  (string) checkinProcessEdit.SelectedItem);

and suggest to convert it to:

            _config.CheckInProcessId = LookupListManager.Lookup[typeof(Processes), (string) checkinProcessEdit.SelectedItem];

Search now is not finding the initial code, nor is the hint appearing. What am I doing wrong?

ReSharper 5.0, C# edition
Visual Studio 2008 Pro SP1

Thank you!



Attachment(s):
mypattern.xml
1 comment
Comment actions Permalink

Remove trailing semicolon in pattern and you'll get what you want.

In this case ReSharper will search method invocation expression, while in your original pattern it tries to search complete statement.

0

Please sign in to leave a comment.