Skip to content

DryIocDependencyResolver class

Defined in

Namespace: Splat.DryIoc Assembly: Splat.DryIoc.dll Full name: Splat.DryIoc.DryIocDependencyResolver Modifiers: public

Summary

View source

        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

NameSummary
.ctorProvides an implementation of the IDependencyResolver interface using a DryIoc container for dependency resolution and registration. ...

Methods

NameSummary
GetServiceGets an instance of the given serviceType. Must return null if the service is not available (must not throw).
GetServicesGets all instances of the given serviceType. Must return an empty collection if the service is not available (must not return null or throw).
HasRegistrationDetermines whether a registration exists for the specified service type and contract.
RegisterRegisters a factory method for creating instances of a specified service type and contract.
RegisterConstantRegisters a constant value of the specified reference type for later retrieval or use.
RegisterLazySingletonRegisters a singleton service of type T that is created lazily using the specified factory function.
UnregisterCurrentUnregisters the current instance of the specified service type and contract from the container.
UnregisterAllUnregisters all service registrations that match the specified service type and contract.
ServiceRegistrationCallbackRegisters a callback to be invoked when a service of the specified type and contract is registered or unregistered.
Dispose
Inherited members