I am just beginning to explore SignalR in our MVC 4 project. One of the things I would like to do is add Ninject DI to our Hub classes. Two questions:
1) I found and installed SignalR.Ninject, but having done so, I'm not quite sure what I do with it. I tried add the following line to the RegisterServices() method in the AppStart NinjectWebCommon file, but this produced a compilation error.
private static void RegisterServices(IKernel kernel)
{
kernel.Load(
new Repositories.AssetModule()
);
GlobalHost.DependencyResolver = new
SignalR.Ninject.NinjectDependencyResolver(kernel);
}
2) Once correctly configured, can I use constructor injection with the Hub class, or do I need to use property injection with the [Inject] attribute?
Any direction would be much appreciated.