-
-
Notifications
You must be signed in to change notification settings - Fork 127
Description
Hi,
I'm trying to use DryIoc in Blazor apps in our framework. Normally, applications within the framework(Mvc Core, CoreWcf, Console, etc..) use AsyncExecutionFlowScopeContext
and employ the OpenScope
method in places where async/await is used, enabling them to utilise this scope even in deeper methods. We have lots of methods working like this. When using AsyncExecutionFlowScopeContext with Blazor, it throws a lot of error like RemoteNavigationManager not initalized
,etc.. So I can't use AsyncExecutionFlowScopeContext with Blazor.
What I actually need is to run the OpenScope method with an async execution flow when appropriate and with a thread execution flow when appropriate. That way, I won't have to provide an AsyncExecutionFlowScopeContext when creating the container, and I'll be able to use either async or thread execution flow depending on the situation wherever I use OpenScope. Is there a way to do this? Or what other approach would you suggest?
By the way, I know that async flow doesn't work properly in Blazor, but I need to resolve many points, such as background tasks, with IOC, and this type of usage is found throughout our framework code. Therefore, it is essential that I can run OpenScope with async execution flow.