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