EnvironmentBasedScope

fun EnvironmentBasedScope(env: InjectionEnvironment): InjectionScope

Creates an injection scope based on the given environment. If the given environment supports meta-environments (i.e. if it is extensible), an ExtensibleEnvironmentBasedScope will be returned. Otherwise, a SimpleEnvironmentBasedScope is used.

This should be used in almost all cases - the ability to control the inject call mechanism is mostly useful for dependencies analysis.