-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SignalR Core integration package #27
Comments
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! |
@Sprint-Debugger, please create a new issue with a minimal, reproducible example that demonstrates your issue. |
It is here: simpleinjector/SimpleInjector#851 |
This package should do the following:
SimpleInjectorHubActivator<T>
classRegisterMvcControllers
of the ASP.NET Core MVC integration package. i.e. it should register Hub classes based on the selected lifestyle (ILifestyleSelectionBehavior
) and should suppress the disposable transient components warning in case theHub
implementation does not overrideDispose(bool)
.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 implementedIDisposable
(and it shouln't have).There are other complications, such as discussed here that should be taken into consideration, which are:
SimpleInjectorHubActivator<T>
must create a newScope
within itsCreate
method, and dispose of theScope
in theRelease
method.In case the absense of an active scope, the hub activator should be able to supply the Simple Injector ASP.NET Core integration with the activeThe hub should run in its own Simple Injector scope and MS.DI scope; reusing the same incoming MS.DI scope might have hard to predict side effects.IServiceScope
/IServiceProvider
instance to prevent Simple Injector from creating a newIServiceScope
internal, which would, again, lead to multiple instances of scoped registrations, but now for ASP.NET Core registered types.The following issues should be taken into consideration:
The text was updated successfully, but these errors were encountered: