How to navigate to implementation of generic interface for specific type?

Let's say we have an interface ICommandHandler<T>.

There are several implementations of the interface for different T's (dozens in our code) like:

public class AddStockRequestLineItemCommandHandler : ICommandHandler<AddStockRequestLineItemCommand>
public class RemoveStockRequestLineItemCommandHandler : ICommandHandler<RemoveStockRequestLineItemCommand>
public class StockRequestFufillingUpdateCommandHandler : ICommandHandler<StockRequestFufilingUpdateCommand>

In an MVC controller we have:

public StockRequestController( ICommandHandler<RemoveStockRequestLineItemCommand> stockRequestLineItemRemoveHandler)
    this.stockRequestLineItemRemoveHandler = stockRequestLineItemRemoveHandler;

Now I'd like to goto the implementation of ICommandHandler<RemoveStockRequestLineItemCommand>.
If I just use Goto Implementation, I get all implementations of ICommandHandler<T>. I just want all implementations of ICommandHandler<RemoveStockRequestLineItemCommand>.

Is this possible in ReSharper? I sure can't find out how to do it.

Comment actions Permalink


Seems like Find Usages in recent versions asks of whether you'd like to search
for the exact specification of the generic, or for an open generic. The former
should find the thing.

Serge Baltic
JetBrains, Inc —
“Develop with pleasure!”

Comment actions Permalink

It is probably listed in the list of usages, but that's not what I want. I want to go to the Implementation of that specific type.


Please sign in to leave a comment.