Indigo.Functions icon indicating copy to clipboard operation
Indigo.Functions copied to clipboard

Support for scoped services?

Open andyce1010 opened this issue 6 years ago • 2 comments

Does this package support services with the scoped lifetime?

There are no scoped services in the samples, and when I try it myself, scoped services seem to be performing like singletons.

If these are not supported, please can you mention this in the readme.

andyce1010 avatar Sep 19 '18 16:09 andyce1010

I have had the same issue with scoped services.

darrenhull avatar Sep 20 '18 07:09 darrenhull

Hmm, I could add support for scoped services, but do you mind sharing what is your use case for scoped instances?

The main challenge is to have a reliable way to detect when scope can be safely disposed, but Azure Functions doesn't provide a supported way right now. See: https://github.com/Azure/azure-webjobs-sdk/issues/1934 https://github.com/Azure/azure-functions-host/issues/3494 And of course change that broke the old way: https://github.com/Azure/azure-webjobs-sdk/issues/1865

daulet avatar Sep 30 '18 01:09 daulet