dependency_injection library
Dependency Injection
Provides support for registering and accessing dependencies according to their service lifetime.
To use, import package:extensions/dependency_injection.dart
.
Classes
- AsyncDisposable
- Provides a mechanism for releasing unmanaged resources asynchronously.
- CancellationChangeToken
- A ChangeToken implementation using CancellationToken.
- CancellationToken
- Propagates notification that operations should be canceled.
- CancellationTokenRegistration
- CancellationTokenSource
- Signals to a CancellationToken that it should be canceled.
- ChangeToken
- Propagates notifications that a change has occurred.
- CompositeChangeToken
- An ChangeToken which represents one or more ChangeToken instances.
- Disposable
- Provides a mechanism for releasing unmanaged resources.
- ServiceCollection
- Specifies the contract for a collection of service descriptors.
- ServiceDescriptor
- Describes a service with its service type, implementation, and lifetime.
- ServiceProvider
- Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
-
ServiceProviderFactory<
TContainerBuilder> - Provides an extension point for creating a container specific builder and an ServiceProvider.
- ServiceProviderOptions
- Options for configuring various behaviors of the default ServiceProvider implementation.
- ServiceScopeFactory
-
A factory for creating instances of
ServiceScope
, which is used to create services within a scope.
Enums
- ServiceLifetime
- Specifies the lifetime of a service in a ServiceCollection.
Extensions
- ServiceCollectionContainerBuilderExtensions on ServiceCollection
- Extension methods for building a ServiceProvider from a ServiceCollection.
- ServiceCollectionDescriptorExtensions on ServiceCollection
- Extension methods for adding and removing services to an ServiceCollection.
- ServiceCollectionServiceExtensions on ServiceCollection
- Extension methods for adding services to a ServiceCollection.
- ServiceProviderServiceExtensions on ServiceProvider
- Extension methods for getting services from a ServiceProvider.
- ServiceScopeFactoryExtensions on ServiceScopeFactory
- Extension methods for getting services from a ServiceScopeFactory.
Typedefs
- ImplementationFactory = Object Function(ServiceProvider services)