provideValue<T> method
void
provideValue<T>(
- T value
Registers an existing value instance for type T.
Useful for configuration objects, pre-constructed clients, or constant values.
Example
container.provideValue<AppConfig>(loadedConfig);
Implementation
void provideValue<T>(T value) {
_bindings[T] = _Binding<T>.value(value);
}