Azure / Azure/azure-functions-host

Hook in FunctionsStartup with access to the correct instance of IServiceProvider

Open
#7,153 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### What problem would the feature you're requesting solve? Please describe.
I'm trying to integrate SimpleInjector with the build-in dependency injection system using an integration package for ServiceCollection. This requires access to the instance of IServiceProvider as discussed [here](https://github.com/simpleinjector/SimpleInjector/issues/894). I know that support for other DI frameworks is not on the list of features you want to build, but my problem is really more generic since many third party packages and frameworks has AddXXX and UseXXX extensions for setting it up. Currently only AddXXX is supported.

#### Describe the solution you'd like
We already have the FunctionsStartup class with the Configure method. What would be nice, would be another hook later in the startup process like the Configure method in ASP.Net Core that has access to IApplicationBuilder and thereby the instance of IServiceProvider through IApplicationBuilder.ApplicationServices.

Contributor guide

Open the contributing guide

Research direction

Start by reading the FunctionsStartup class and its Configure method, then compare the requested lifecycle hook with ASP.NET Core's Configure and IApplicationBuilder.ApplicationServices pattern. Done means defining and documenting a later startup hook that exposes the correct IServiceProvider for third-party UseXXX integrations.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.