Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
img
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

stashbox

Appveyor build status Travis CI build status Tests Coverage Status Quality Gate Sourcelink

Stashbox is a lightweight, fast and portable dependency injection framework for .NET based solutions.

Github (stable) NuGet (stable) Fuget (stable) NuGet (latest)
Github release NuGet Version Stashbox on fuget.org Nuget pre-release

Core attributes

  • Thread-safe and lock-free operations.
  • Memory efficency - reduces its memory footprint as much as possible.
  • Circular dependency detection - checks the dependency tree for cycles and throws a specific exception if it finds any.
  • Diagnostics - detects and warns about common configuration issues.
  • Fast feedback - throws exceptions early with as much detail about the issue as possible.

Features

Supported platforms

  • .NET 4.0 and above
  • .NET Core
  • Mono
  • Universal Windows Platform
  • Xamarin (Android/iOS/Mac)
  • Unity

Community

Join the chat at https://gitter.im/z4kn4fein/stashbox Slack OpenHub

Sample usage

class Wulfgar : IBarbarian
{
    private readonly IWeapon weapon;
    
    public Wulfgar(IWeapon weapon)
    {
        this.weapon = weapon;
    }
}

var container = new StashboxContainer();

container.Register<IWeapon, AegisFang>();
container.Register<IBarbarian, Wulfgar>();

var wulfgar = container.Resolve<IBarbarian>();

Extensions

Documentation

Benchmarks


Powered by Jetbrains' Open Source License

Jetbrains

You can’t perform that action at this time.