how to use ValidateScopes in autofac?

Viewed 16

if i use default ioc in asp.net core,i can use this option :

WebHost.CreateDefaultBuilder(args)
    .UseDefaultServiceProvider((context, options) => {
        options.ValidateScopes = true;
    })

but how to use this config in autofac? I don't see any relevant documentation on the github homepage

When ValidateScopes is set to true, the default service provider performs checks to verify that: Scoped services aren't directly or indirectly resolved from the root service provider. Scoped services aren't directly or indirectly injected into singletons.

1 Answers
Related