-
Designed for low-ceremony use, performance, and extensibility.
-
Supports: .NET 3.5+, .NET Standard 1.0, 1.3, 2.0, PCL Profiles 259, 328
-
NuGet packages:
-
Check two original parts of DryIoc and now a standalone projects: FastExpressionCompiler and ImTools
- General use-cases optimized for max speed.
- Memory footprint preserved as small as possible.
- No dependencies on the other libraries.
- Public API is fully documented.
- 1000+ of acceptance tests.
- Thread-safe and lock-free registrations and resolutions.
- Detects recursive dependencies aka cycles in object graph.
- Throws exceptions as early as possible with a lot of details.
- Provides diagnostics for potential resolution problems via
container.Validate()
.
- Register interface/type mapping, additionally supported: registering service once, registration update, removing registration.
- Register user-defined delegate factory and register existing instance.
- Register implementation types from provided assemblies with automatically determined service types.
- Register with service key of arbitrary type, or register multiple non-keyed services.
- Register with resolution condition.
- Register with associated metadata object of arbitrary type.
- Resolve and ResolveMany.
- Unknown service resolution:
- Optional automatic concrete types resolution
- Instance lifetime control or Reuse in DryIoc terms:
- Nested disposable scopes with optional names
- Ambient scope context
- Supported out-of-the-box:
Transient
,Singleton
,Scoped
in multiple flavors, including scoped to specific service in object graph useParentReuse
and useuseDecorateeReuse
option for injected dependencies- Control reused objects behavior with
preventDisposal
andweaklyReferenced
.
- Extensive Open-generics support: constraints, variance, complex nested, recurring generic definitions
- Constructor, and optional property and field injection.
- Static and Instance factory methods in addition to constructor. Factory method supports parameter injection the same way as constructor!
- Injecting properties and fields into existing object.
- Creating concrete object without registering it in Container but with injecting its parameters, properties, and fields.
- Generic wrappers:
- Service collections:
T[]
,IEnumerable<T>
,LazyEnumerable<T>
, andI(ReadOnly)Collection|List<T>
. - Other:
Lazy<T>
,Func<T>
,Meta<TMetadata, T>
orTuple<TMetadata, T>
,KeyValuePair<TKey, T>
, and user-defined wrappers. - Currying over constructor (or factory method) arguments:
Func<TArg, T>
,Func<TArg1, TArg2, T>
, etc. - Nested wrappers: e.g.
Tuple<SomeMetadata, Func<ISomeService>>[]
.
- Service collections:
- Composite pattern: Composite itself is excluded from result collection.
- Decorator pattern.
DryIocAttributes.dll
DryIocAttributes (sources)
- Extends MEF attributes to cover DryIoc features: metadata, advanced reuses, context based registration, decorators, etc.
- Does not depend on DryIoc and may be used by other IoC libraries.
Slim IoC Container based on service factory delegates generated at compile-time by DryIoc.
- Does not depend on DryIoc at run-time.
- Ensures zero application bootstrapping time associated with IoC registrations.
- Provides verification of DryIoc registration setup at compile-time by generating service factory delegates. Basically you can see how DryIoc is creating things.
- Supports everything registered in DryIoc: reuses, decorators, wrappers, etc.
- Much smaller and simpler than DryIoc itself. Works standalone without any run-time dependencies.
- Allows run-time registrations too. You may register instances and delegates at run-time.
-
ASP.NET:
-
OWIN:
Icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY