Skip to content
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

Cannot inject dependencies in the sockethandler or use servicelocator to do so #72

Open
danielohirsch opened this issue May 31, 2018 · 1 comment

Comments

@danielohirsch
Copy link

Since the middleware is scoped differently in the service registration - it won't allow something to either be injected (obviously) or created inside that scope that is not scoped the same. For instance, I have a manager that I am using a special factory to instantiate - inside a method on the WebSocketHandler...

I tried scoping my factory in different ways - but because the handler (acting as the controller) is scoped differently then my manager... it won't allow it - in dotnetcore 2+

I don't see a nice way around this... because to do method injection on the invoke method would require me to either override and recode the invoke method or do something else wonky to get the classes that I need... any advice would be appreciated.

@egops
Copy link

egops commented Aug 29, 2018

Same problem right here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants