search with pattern

I have posted about this at stackoverflow but have not received an answer. To see the original question click http://stackoverflow.com/questions/5048186/resharper-search-with-pattern-for-using-new-system-data-linq-datacontext

I am attempting to search for

using (var context = new $DataContext$())

where DataContext is any class that extends

System.Data.Linq.DataContext
using Resharpers 'Search with Pattern'.
The pattern I'm using is:
using($type$ $var$ = new $type$($args$))
{
  $stmt$
}

enter image description here
This appears to return all using statements, eg using StreamWriter, using FileStream, things that clearly do not derive from

System.Data.Linq.DataContext

How can you return only the types indicated?
I am using VS 2010 SP1 Beta and ReSharper 5.1 C# Edition build 5.1.1727.12


Attachment(s):
O9icG.jpg
2 comments

Thanks for reporting this bug.

I can reproduce it with latest 5.1.3, but it's already fixed in ReSharper 6 EAP builds. Please try them.

Sorry for the inconvenience.
0

Please sign in to leave a comment.