-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
In SimpleInjectorServiceCollectionExtensions
Hi
I've been trying to use ServiceCollection Integration on a Win Form Project which is defined as Transient in the DefaultLifestyle but i have a problem whenever I use the ServiceCollection Integration, exactly in the AddSimpleInjector method which try change the DefaultScopedLifeStlye (which is null in the first place).
// Set lifestyle before calling setupAction. Code in the delegate might depend on that.
TrySetDefaultScopedLifestyle(container);private static void TrySetDefaultScopedLifestyle(Container container)
{
if (container.Options.DefaultScopedLifestyle is null)
{
container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
}
}It throws an exception related that the DefaultScopedLifestyle shouldn't be changed after initialization..
Is this the expected behavior?
Why should it changed to a AsyncScopedLifeStyle if i am working with a Transient lifestyle?
Metadata
Metadata
Assignees
Labels
No labels