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), ...
Get SignalR Real-time Application Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.