I have a C# codebase which has evolved over the past year, and I'd like to get some visibility on the number of interface type references vs class type references. Suppose the code is:
namespace Infrastructure {
public class Foo {
private ConcreteClass _field1;
private OtherConcreteClass _field2;
private IInterface _field3;
public void SomeMethod(ConcreteClass parameter1, IInterface parameter2) {
_field1 = parameter1;
_field3 = parameter2;
OtherConcreteClass newVariable = new OtherConcreteClass();
}
}
}
Does anyone know of a tool that would report that there are 2 declared interface references and 4 declared class references in this snippet? I've looked at R#, SourceMonitor, CLOC, and a few others, with no success so far.
The best code metric tool I used so for is nDepend (http://www.ndepend.com/) but I'm not sure it will give you the information you want (but it'wll give you many more ...)
I hope this help