Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.17.0" />

 ContainerConfigurator

public class ContainerConfigurator
Represents a container configurator.

The container configuration.

Sets a callback delegate to call when the container configuration changes.

Enables or disables conventional resolution, which means the container treats the constructor/method parameter or member names as dependency names used by named resolution.

public ContainerConfigurator WithAdditionalDependencyAttribute<TAttribute>() where TAttribute : Attribute

Adds an attribute type that is considered a dependency indicator just like DependencyAttribute.

Adds an attribute type that is considered a dependency name indicator just like DependencyNameAttribute.

public ContainerConfigurator WithAutoMemberInjection(AutoMemberInjectionRules rule = 4, Func<MemberInfo, bool> filter = null, bool enabled = true)

Enables or disables the auto member-injection without annotation.

Sets the constructor selection rule used to determine which constructor should the container use for instantiation

Sets the default lifetime used when a service doesn't have a configured one.

Enables or disables the default value injection.

Enables or disables the tracking of disposable transient objects.

Enables or disables the throwing of a ResolutionFailedException when no services are found for a collection resolution request. When this feature is disabled (default), the container returns an empty array for the collection resolution request.

Sets an external expression tree compiler used by the container to compile the generated expressions.

public ContainerConfigurator WithLifetimeValidation(bool enabled = true)

Enables or disables the life-span and root resolution validation on the dependency tree.

Enables or disables the selection of named registrations when the resolution request is un-named but with the same type.

Enables or disables the re-building of singletons in child containers. It allows the child containers to effectively override singleton dependencies in the parent. This feature is not affecting the already built singleton instances in the parent.

Sets the actual behavior used when a new service is registered into the container. These options do not affect named registrations. See the RegistrationBehavior enum for available options.

Enables or disables required member injection.

Sets the universal name that represents a special name which allows named resolution work for any given name.

Enables or disables the unknown type resolution.

public ContainerConfigurator WithVariantGenericTypes(bool enabled = true)

Enables or disables the check for generic covariance and contravariance during the resolution of generic type collections.