File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/SimpleInjector.Integration.ServiceCollection Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,15 @@ public static IServiceCollection AddSimpleInjector(
7373 // Set lifestyle before calling setupAction. Code in the delegate might depend on that.
7474 TrySetDefaultScopedLifestyle ( container ) ;
7575
76- setupAction ? . Invoke ( options ) ;
77-
76+ // #17: We must register the service scope before calling the setupAction. This allows setup code to
77+ // replace it.
7878 RegisterServiceScope ( options ) ;
7979
80- // Unfortunately, the addition of the IHostedService breaks Azure Functions. Azure Functions do no support
81- // IHostedService. See: https://stackoverflow.com/questions/59947132/. This is why we had to make this
82- // conditional.
80+ setupAction ? . Invoke ( options ) ;
81+
82+ // #15: Unfortunately, the addition of the IHostedService breaks Azure Functions. Azure Functions do no
83+ // support IHostedService. See: https://stackoverflow.com/questions/59947132/. This is why we had to make
84+ // this conditional.
8385 if ( options . EnableHostedServiceResolution )
8486 {
8587 HookAspNetCoreHostHostedServiceServiceProviderInitialization ( options ) ;
You can’t perform that action at this time.
0 commit comments