Type forwarding, weak types & optionals
New features
- Added weakly-typed API to resolve components when exact type is unknown during compile time.
#79, @ilyapuchka - Added type forwarding feature. You can register the same factory to resolve different types.
#89, @ilyapuchka - Container now can resolve optional types 🎉
#84, @ilyapuchka - Added container context that provides contextual information during graph resolution process.
#83, @ilyapuchka - Added method to validate container configuration.
#87, @ilyapuchka - Added method to manually set value wrapped by auto-injection wrappers.
#81, @ilyapuchka - Added separate error type for failures during auto-wiring.
#85, @ilyapuchka
Note
With introduction of type-forwarding the behavior of func resolveDependencies(block: (DependencyContainer, T) throws -> ()) -> DefinitionOf<T, F>
changed. Now you can call this method several times on the same definition. When instance is resolved using this definition the container will call all the blocks that you passed to this method in the same order as you called this method.