All products / Saraff.Twain.DS / Contents
IoC Container Features
Saraff.Twain.DS uses Saraff.IoC 2.0.0.
- Simplified object creation, especially for hierarchical object structures and dependencies.
- Registration of existing instances.
- Registration does not require
System.ComponentModel.IComponent(Register/RegisterInstance); the legacyBindAPI requiresIComponent. - Code-based and design-time registration (
Register/Load,[BindService]). - Automatically injects registered types at runtime through a constructor, property or method (
[ServiceRequired]). - Deferred resolution (
Lazy<T>). - Scopes (
CreateScope),IEnumerable<T>and open-generic resolution, named registrations. - Thread-safe resolution and dependency-cycle detection.
- Automatic disposing of
IDisposable/IAsyncDisposableinstances. - Configuration is split into groups (
IContainerBindingConfiguration,IContainerInjectionConfiguration,IContainerInterceptionConfiguration,IContainerLifetimeConfiguration,IContainerRegistrationConfiguration, …). - The legacy
Bind/Load/CreateInstanceAPI is preserved for compatibility.
For more info see Saraff.IoC