yesterday I commented on the availability of Unity for .net 4.5 and also made a comment on Agent Mulder . Agent Mulder is an awesome extension for ReSharper that allows you to navigate to a specific type declarations and implementations when we are working with some dependency injection container.
How to explain it in words I’m not well today, better go to an example. Suppose that we are working with Unity and have a with the following example console application:
1: using System;
2: using System.Diagnostics;
3: using Microsoft.Practices.Unity;
5: namespace ConsoleApplication1
7: class Program
9: static void Main(string args)
11: var container = new UnityContainer();
12: container.RegisterType<ILogger, LogDebug>();
13: var log = container.Resolve<ILogger>();
14: log.Log("sample data");
18: internal interface ILogger
20: void Log(string data);
22: class LogTrace: ILogger
24: public void Log(string data)
29: class LogDebug : ILogger
31: public void Log(string data)
In the Visual Studio IDE, trying to see where the LogDebug class has been used is a bit craftsmanship, having no direct references, because it is a little complicated to know where you are using. If we see the help online that we since we will see something similar to the following in the code editor
Now if you download and install Agent Mulder , this plugin from ReSharper will show us that the class LogDebug() is registering and using with Unity. We can access registration of the same line and even then accessing dynamic references of ReSharper to see where it is implemented and use the Log() function.
In a few words Agent Mulder helps us to navigate between the references that we do with a dependency injector, as Unity, CastleWindsor, etc. The official website of the product sample is mounted on CastleWindsor .
Saludos @ La Finca