dotnetjunkie / Missing-Core-DI-Extensions

Missing extension methods for non-conformers.
19 stars 12 forks source link

Adding Support for ASP.NET Core SignalR Hubs #3

Open kostemar opened 6 years ago

kostemar commented 6 years ago

Hello

I really like the approach demonstrated with this repo where you don't replace the whole DI container that ASP.NET Core provides.

I was wondering if there are any plans to add support for SignalR hubs. In particular, I would like to support a scenario similar to the one described in the StockTicker sample. In the StockTicker sample, the StockTickerHub has a dependency on IStockTicker. A StockTicker in turn has a dependency on IHubContext\<StockTickerHub>.

dotnetjunkie commented 6 years ago

With SignalR Core, it should be just a matter of replacing the default IHubActivator implementation with one that resolves from your favorite container, or creates hub instances using Pure DI.