DryIocDependencyResolver class¶
Defined in
Namespace: Splat.DryIoc
Assembly: Splat.DryIoc.dll
Full name: Splat.DryIoc.DryIocDependencyResolver
Modifiers: public
Summary¶
Provides an implementation of the IDependencyResolver interface using a DryIoc container for dependency resolution
and registration.
<https://bitbucket.org/dadhi/dryioc/wiki/Home>.
Applies to
net10.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-ios17.5, net8.0-tvos17.2, net8.0-tvos17.2, netstandard2.1, netstandard2.1, netstandard2.0, netstandard2.0, net471, net481, net462
Class hierarchy
classDiagram
class DryIocDependencyResolver
class IDependencyResolver {
<>
}
IDependencyResolver <|.. DryIocDependencyResolver
class IReadonlyDependencyResolver {
<>
}
IReadonlyDependencyResolver <|.. DryIocDependencyResolver
class IMutableDependencyResolver {
<>
}
IMutableDependencyResolver <|.. DryIocDependencyResolver
class IDisposable {
<>
}
IDisposable <|.. DryIocDependencyResolver
Implements: IDependencyResolver, IReadonlyDependencyResolver, IMutableDependencyResolver, IDisposable
Remarks¶
This resolver enables integration with DryIoc for managing service lifetimes and contracts. If no container is supplied, the resolver creates and manages its own internal container instance. Thread safety and disposal of the underlying container are managed by this class.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Provides an implementation of the IDependencyResolver interface using a DryIoc container for dependency resolution and registration. ... |
Methods¶
| Name | Summary |
|---|---|
| GetService | Gets an instance of the given serviceType. Must return null if the service is not available (must not throw). |
| GetServices | Gets all instances of the given serviceType. Must return an empty collection if the service is not available (must not return null or throw). |
| HasRegistration | Determines whether a registration exists for the specified service type and contract. |
| Register | Registers a factory method for creating instances of a specified service type and contract. |
| RegisterConstant | Registers a constant value of the specified reference type for later retrieval or use. |
| RegisterLazySingleton | Registers a singleton service of type T that is created lazily using the specified factory function. |
| UnregisterCurrent | Unregisters the current instance of the specified service type and contract from the container. |
| UnregisterAll | Unregisters all service registrations that match the specified service type and contract. |
| ServiceRegistrationCallback | Registers a callback to be invoked when a service of the specified type and contract is registered or unregistered. |
| Dispose |