O'Reilly logo

SignalR Real-time Application Cookbook by Roberto Vespa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required