-
Notifications
You must be signed in to change notification settings - Fork 2
DependencyContainer
API / DependencyContainer class
Represents a dependency container for configuring and later on resolving dependencies similar to a dependency injection mechanism.
Implements IDependencyContainer, IDependencyResolver.
class DependencyContainer
implements IDependencyContainer, IDependencyResolver
Source reference: src/dependencies/DependencyContainer.ts:9
.
-
constructor - Initializes a new instance of the
DependencyContainer
class.
- createScope - Creates a scoped dependency resolver. All scoped configured dependencies are resolved for each scope individually,
- registerInstanceToToken - Registers the provided instance for the given token.
- registerScopedFactoryToToken - Registers the provided callback for the given token as a scoped dependency.
- registerScopedType - Registers the provided type as a scoped dependency.
- registerScopedTypeToToken - Registers the provided type for the given token as a scoped dependency.
- registerSingletonFactoryToToken - Registers the provided callback for the given token as a singleton dependency.
- registerSingletonType - Registers the provided type as a singleton dependency.
- registerSingletonTypeToToken - Registers the provided type for the given token as a singleton dependency.
- registerTransientFactoryToToken - Registers the provided callback for the given token as a transient dependency.
- registerTransientType - Registers the provided type as a transient dependency.
- registerTransientTypeToToken - Registers the provided type for the given token as a transient dependency.
- resolve - Resolves a dependency based on its configuration, if any. All unconfigured dependencies are transient.
- DependencyContainer
Overview
Motivation
Guides and Tutorials - Getting Started
Releases
CodeSandbox
API
Events
IEvent
IEventHandler
EventDispatcher
ViewModels
INotifyPropertiesChanged
ViewModel
Forms
Form
IFormFieldConfig
FormField
ReadOnlyFormCollection
FormCollection
IConfigurableFormCollection
FormSetupCallback
Validation
IValidator
ValidatorCallback
IObjectValidator
IValidatable
Validation / Triggers
WellKnownValidationTrigger
ValidationTrigger
Observable Collection
ReadOnlyObservableCollection
ObservableCollection
INotifyCollectionChanged
CollectionChangeOperation
INotifyCollectionReordered
CollectionReorderOperation
Observable Map
ReadOnlyObservableMap
ObservableMap
INotifyMapChanged
MapChangeOperation
Observable Set
ReadOnlyObservableSet
ObservableSet
INotifySetChanged
SetChangeOperation
Dependency Handling
IDependencyResolver
IDependencyContainer
DependencyContainer
useDependency
useViewModelDependency
useDependencyResolver
React Hooks
useViewModel
useViewModelMemo
useObservableCollection
useObservableMap
useObservableSet