Introducing dependency injection (advanced approach)
The previous recipe was interesting and showed good potential, but we might need more. SignalR is a framework that supplies quite a specific set of features, hence it's likely to be used from inside more complex applications, with different modules and components. In such a design, chances are that the host application will already have some other general-purpose dependency injection system in place, probably using one of the many good Inversion of Control container libraries available out there. SignalR does not let us down even in this case, allowing us to inject our preferred IoC container into it.
Here, we'll reproduce the same problem that we solved in the previous one (the translator service), but this time we'll use Ninject as a general purpose IoC container in order to register and then inject our dependencies.
Getting ready
For this recipe, we'll use a new empty web application, which we'll call Recipe43
. We will not reiterate the...