simpleinjector / SimpleInjector.Integration.AspNetCore

MIT License
2 stars 3 forks source link

Add SignalR Core integration package #27

Open dotnetjunkie opened 4 years ago

dotnetjunkie commented 4 years ago

This package should do the following:

Especially this last point is the main reason why we need an integration package. Integrating SignalR without an integration package would have been trivial in case Hub would not have implemented IDisposable (and it shouln't have).

There are other complications, such as discussed here that should be taken into consideration, which are:

The following issues should be taken into consideration:

dotnetjunkie commented 4 years ago

For now, we made the decision not to add an integration package. This page describes how to integrate Simple Injector with SignalR Core.

Sprint-Debugger commented 4 years ago

For now, we made the decision not to add an integration package. This page describes how to integrate Simple Injector with SignalR Core.

Can you provide a full working example using this solution? I keep trying it whole day without a success! My problem is that the connection is established, but when I send a message from the server to the clients, the clients do not receive anything. If I remove just this line of code: ".AddControllerActivation();", it starts working, but then a controller might throw an exception if there is a dependency just in SimpleInjector container, but not in .NET Core's DI container. Versions I used (and tried): ASP.NET Core 3.1, SimpleInjector: from 4.9.1 to 5.0.0, @microsoft/signalr: 3.1.5

dotnetjunkie commented 4 years ago

@Sprint-Debugger, please create a new issue with a minimal, reproducible example that demonstrates your issue.

lneshev commented 4 years ago

@Sprint-Debugger, please create a new issue with a minimal, reproducible example that demonstrates your issue.

It is here: https://github.com/simpleinjector/SimpleInjector/issues/851