Can ReSharper detect code used via Spring.NET Dependency Injection?

I have been looking for a way to have ReSharper detect when a class is referenced via a Dependency Injection through Spring.NET.  I searched around the forum a bit and did not find anything related.  So, I'm wondering...

Is this currently possible (either with 4.5 or 5.0) and how to enable it?

Is this something that would need to be added via a plugin?

(if so, what is the best way to get started with plugin development?)

Any help is greatly appreciated.

// Joe

2 comments
Comment actions Permalink

I suppress Never Instantiated methods for injected classes with attributes. You have to add a reference to JetBrains.Annotations.dll and then create your own attribute and decorate it with the MeansImplicitUse attribute from JetBrains like so:


    [MeansImplicitUse]
    public class IoCAttribute : Attribute { }




Then on the class giving you the error

   [IoC]
   public class InjectedClass
   {...}
0
Comment actions Permalink

This would be a great feature to add.  Our projects depend heavily on spring for dependency injection.

Another problem is that Fitnesse fixtures have their methods reported as unused as well. :(

0

Please sign in to leave a comment.