Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper navigate to a concrete implementation of a generic interface?

Is there anyway to get Resharper to navigate to the concrete implementation of an generic interface for a specific type.

E.g. ICommandHandler<T> and find the concrete implementation? I can get Resharper to show all implementations of ICommandHandler but not allow me to easily get to the implementation of the type T. We have hundreds of handlers and navigating is getting slower.

We are using Resharper 7.1

Update

Examples include things like:

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

Usage like in MVC controller constructor like:

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

I'd love to be able to click on ICommandHandler<RemoveStockRequestLineItemCommand> and go to the implementing class RemoveStockRequestLineItemCommandHandler

like image 300
GraemeMiller Avatar asked Mar 07 '13 23:03

GraemeMiller


1 Answers

Resharper 9.1.1 supports finding the usages of a generic interface. Right click on IComamndHandler and it will show you the usages. However, it would appear, still no way of finding implementations.

Best solution we came up with was

/// <summary>
/// <see cref="ChangePersonAddressCommandHandler"/>
/// </summary>

Using cref link http://msdn.microsoft.com/en-us/library/cc837134.aspx and template and added this above the command or in our controller.

Would love not to have to do this and just navigate straight there with Resharper

like image 151
GraemeMiller Avatar answered Nov 11 '22 05:11

GraemeMiller