Microsoft.Extensions.DependencyInjection
Pretty print a type name.
The .
true to print a fully qualified name.
true to include generic parameter names.
true to include generic parameters.
Character to use as a delimiter in nested type names
The pretty printed type name.
Default implementation of .
Initializes a new instance of the class
with default options.
Initializes a new instance of the class
with the specified .
The options to use for this instance.
Extension methods for building a from an .
Creates a containing services from the provided .
The containing service descriptors.
The .
Creates a containing services from the provided
optionally enabling scope validation.
The containing service descriptors.
true to perform check verifying that scoped services never gets resolved from root provider; otherwise false.
The .
Creates a containing services from the provided
optionally enabling scope validation.
The containing service descriptors.
Configures various service provider behaviors.
The .
Validates that two generic type definitions have compatible trimming annotations on their generic arguments.
When open generic types are used in DI, there is an error when the concrete implementation type
has [DynamicallyAccessedMembers] attributes on a generic argument type, but the interface/service type
doesn't have matching annotations. The problem is that the trimmer doesn't see the members that need to
be preserved on the type being passed to the generic argument. But when the interface/service type also has
the annotations, the trimmer will see which members need to be preserved on the closed generic argument type.
Not null if throwIfCallSiteNotFound is true
Type of service being cached
Reverse index of the service when resolved in IEnumerable<Type> where default instance gets slot 0.
For example for service collection
IService Impl1
IService Impl2
IService Impl3
We would get the following cache keys:
Impl1 2
Impl2 1
Impl3 0
Indicates whether the current instance is equal to another instance of the same type.
An instance to compare with this instance.
true if the current instance is equal to the other instance; otherwise, false.
Summary description for ServiceCallSite
The default IServiceProvider.
Gets the service object of the specified type.
The type of the service to get.
The service that was produced.
Options for configuring various behaviors of the default implementation.
true to perform check verifying that scoped services never gets resolved from root provider; otherwise false. Defaults to false.
true to perform check verifying that all services can be created during BuildServiceProvider call; otherwise false. Defaults to false.
NOTE: this check doesn't verify open generics services.
Unable to activate type '{0}'. The following constructors are ambiguous:
Unable to resolve service for type '{0}' while attempting to activate '{1}'.
A circular dependency was detected for the service of type '{0}'.
No constructor for type '{0}' can be instantiated using services from the service container and default values.
Open generic service type '{0}' requires registering an open generic implementation type.
Arity of open generic service type '{0}' does not equal arity of open generic implementation type '{1}'.
Cannot instantiate implementation type '{0}' for service type '{1}'.
A suitable constructor for type '{0}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
Cannot consume {2} service '{0}' from {3} '{1}'.
Cannot resolve '{0}' from root provider because it requires {2} service '{1}'.
Cannot resolve {1} service '{0}' from root provider.
Constant value of type '{0}' can't be converted to service type '{1}'
Implementation type '{0}' can't be converted to service type '{1}'
'{0}' type only implements IAsyncDisposable. Use DisposeAsync to dispose the container.
GetCaptureDisposable call is supported only for main scope
Invalid service descriptor
Requested service descriptor doesn't exist.
Call site type {0} is not supported
Generic implementation type '{0}' has a DynamicallyAccessedMembers attribute applied to a generic argument type, but the service type '{1}' doesn't have a matching DynamicallyAccessedMembers attribute on its generic argument type.
Generic implementation type '{0}' has a DefaultConstructorConstraint ('new()' constraint), but the generic service type '{1}' doesn't.