-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Peter Csajtai edited this page Feb 11, 2016
·
33 revisions
Stashbox is a lightweight, portable dependency injection framework for .NET based solutions.
Features:
- Fluent interface and attributes for easier configuration
- Child container
- Lifetime scopes
- Conditional resolution
- IDisposable object tracking
- Special type resolution like IEnumerable, arrays,
Lazy<T>
, generics - Custom resolvers can be added
- Can be extended by container extensions
Supported platforms:
- .NET 4.5 and above
- Windows 8/8.1/10
- Windows Phone Silverlight 8/8.1
- Windows Phone 8.1
- Xamarin (Android/iOS/iOS Classic)
class Wulfgar : IBarbarian
{
public Drizzt(IWeapon weapon)
{
//...
}
}
container.RegisterType<IWeapon, AegisFang>();
container.RegisterType<IBarbarian, Wulfgar>();
var wulfgar = container.Resolve<IBarbarian>();
- Service registration
- Factory registration
- Assembly registration
- Composition
- Fluent registration api
- Service resolution
- Resolution by attributes
- Conventional resolution
- Delegate resolution
- Conditional resolution
- Multi resolution
- Lifetimes
- Generics
- Generic wrappers
- Decorators
- Resolvers
- Scopes
- Container configuration
- Container diagnostics
- Exceptions