Dependency Injection with SignalR and MVC

added by tdupont
1/12/2014 5:06:14 PM

0 Kicks, 134 Views

How do you practice inversion of control with SignalR? Just register a custom HubActivator with the already existing DependencyResolver. The HubActivator is only used when trying to resolve a hub; thus the activator can wrap your container of choice and use it to resolve your hub with its dependencies, while leaving the rest of the SignalR pipeline intact.