Core features of DryIoc
masterDryIoc is a high-performance IoC container for .NET that provides extensive capabilities for dependency management. Key features include:
- Registration Management: Map services to implementation types, including support for registering once, replacing, or removing registrations. You can also register delegate factories, existing service instances, or perform batch registrations from assemblies.
- Service Identification: Use service keys of any type to identify registrations, allowing multiple non-keyed implementations for a single service.
- Advanced Injection: Supports constructor parameter injection, optional property/field injection, and injection into existing objects. It also supports static and instance factory methods.
- Open Generics: Full support for open-generics, including type constraints, variance, and complex nesting.
- Service Lifetimes: Control service lifetime via
Reuseand lifetime scoping, including nested disposable scopes, ambient scope context, and variousReusetypes likeTransient,Singleton, andScoped(with support for scoping to specific service ancestors). - Decorators and Wrappers:
- Decorators: Supports nested decorators with relative order control, generic/non-generic decorators, and decorators with different
Reusesettings than the decorated service. - Wrappers: Supports service collections (
T[],IEnumerable<T>,LazyEnumerable<T>,ICollection<T>), single service wrappers (Lazy<T>,Func<T>,Meta<TMetadata, T>,Tuple<TMetadata, T>,KeyValuePair<TKey, T>), and parameter currying viaFunc<TArg, T>.
- Decorators: Supports nested decorators with relative order control, generic/non-generic decorators, and decorators with different