Azure / Azure/azure-functions-host

Make DryIoc Container resolve current scope’s IServiceProvider correctly

Open
#3,792 0 comments 0 reactions 1 assignee Claimed by @fabiocav View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Because DryIoc only leverages the thread id to identify the “current” scope, it can’t be used reliably in a function (which is asynchronous)

https://github.com/Azure/azure-functions-host/blob/73bcc8eb43504e6f7ae8474b311264b5ebf4f724/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs#L7973

The current scope should probably be an AsyncLocal stack.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.