Stashbox 3.4.0

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

Install-Package Stashbox -Version 3.4.0
dotnet add package Stashbox --version 3.4.0
<PackageReference Include="Stashbox" Version="3.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Stashbox --version 3.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

v3.4.0:
- Added the core components of multitenant functionality.
- Throw `ObjectDisposedException` when the container or a scope is used after their disposal.
v3.3.0:
- Added the option to rebuild singletons in child container with dependencies overridden in it.
- Fix: Singleton instances were built when the Validate() was called, now just the expression is generated for them.
v3.2.9:
- Added the option to replace a registration only if an existing one is registered with the same type or name.
v3.2.8:
- Switch to license expression in nuget package.
v3.2.7:
- Minor bugfixes.
v3.2.6:
- The Validate() method now throws an AggregateException containing all the underlying exceptions.
- Minor bugfixes.
v3.2.5:
- Minor bugfixes.
v3.2.4:
- Added the `.WhenDecoratedServiceHas()` and `.WhenDecoratedServiceIs()` decorator configuration options.
v3.2.2:
- Added support of conditional and lifetime managed decorators #93      
v3.2.1:
- Fix: Factory resolution didn't use the built-in expression compiler.
v3.2.0:
- Added IAsyncDisposable support #90
 - It works on >=net461, >=netstandard2.0 frameworks.
 - On net461 and netstandard2.0 the usage of IAsyncDisposable interface requires the
   Microsoft.Bcl.AsyncInterfaces package, on netstandard2.1 it's part of the framework.
- Fix: resolving with custom parameter values #91
     
v3.1.2:
- Fix: IdentityServer not compatible #88
- Fix: Call interception #89
     
v3.1.1:
- Fix: String constant is not handled well by the built-in compiler #86
- Fix: Registration behaviour doesn't respect replacing #87

v3.1.0:
- Fix: Nested named resolution could cause stack overflow #74
- Fix: Improve support for Assemblies loaded into Collectible AssemblyLoadContexts #73
- Fix: Unknown type resolution does not work recursively #77
- Fix: Exception when building expressions #76
- Fix: Bad performance #79
- Fix: Expected override behaviour not working with scopes #80

v3.1.0 Breaking changes:
- `WithUniqueRegistrationIdentifiers()` option has been removed, `WithRegistrationBehavior()` has been added instead.
- Circular dependency tracking is enabled now by default, for runtime tracking the renamed `WithRuntimeCircularDependencyTracking()` option can be used.
- `WithMemberInjectionWithoutAnnotation()` container configuration option has been renamed to `WithAutoMemberInjection()`.
- `SetImplementationType()` option has been added to the registration configuration used when unknown type detected.
- Removed the `GetScopedInstace()` method from the `IResolutionScope`, they are treated as expression overrides now and consumed automatically by the container.
- Lifetimes became stateless and their API has been changed, see the docs for more info (https://github.com/z4kn4fein/stashbox/wiki/Lifetimes).
- Lifetime validation has been added:
 - Tracking dependencies that has shorter life-span than their direct or indirect parent's.
 - Tracking scoped services resolved from root.
 - The container throws a LifetimeValidationFailedException when the validation fails.
- `PerRequestLifetime` has been renamed to `PerScopedRequestLifetime`.
- `RegisterInstanceAs()` has been removed, every functionality is available on the `RegisterInstance()` methods.
- Service/Implementation type map validation has been added to the non-generic registration methods.
- `InjectionParameter` has been replaced with `KeyValuePair<string, object>`.
- `IserviceRegistration` interface has been removed, only it's implementation remained.
- Removed the legacy container extension functionality.
- Removed the support of PCL v259.

NuGet packages (18)

Showing the top 5 NuGet packages that depend on Stashbox:

Package Downloads
Stashbox.Extensions.Dependencyinjection
A Microsoft.Extensions.DependencyInjection extension, which allows Stashbox to be configured as the default service provider.
Stashbox.Moq
Moq auto mocking integration for Stashbox.
Stashbox.Web.Mvc
ASP.NET MVC integration for Stashbox.
Stashbox.Web.WebApi
ASP.NET Web API integration for Stashbox.
Stashbox.NSubstitute
NSubstitute auto mocking integration for Stashbox.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Stashbox:

Repository Stars
structuremap/structuremap
A Dependency Injection/Inversion of Control tool for .NET
danielpalme/IocPerformance
Performance comparison of .NET IoC containers

Version History

Version Downloads Last updated
3.4.0 342 11/15/2020
3.4.0-preview-603 21 11/15/2020
3.4.0-preview-602 41 11/11/2020
3.3.0 315 11/5/2020
3.3.0-preview-601 54 11/4/2020
3.2.9 274 11/2/2020
3.2.9-preview-600 144 10/31/2020
3.2.9-preview-599 50 10/29/2020
3.2.8 1,097 10/17/2020
3.2.8-preview-596 58 10/17/2020
3.2.8-preview-595 65 10/17/2020
3.2.7 106 10/16/2020
3.2.7-preview-594 45 10/16/2020
3.2.6 104 10/16/2020
3.2.6-preview-593 47 10/15/2020
3.2.6-preview-592 62 10/15/2020
3.2.6-preview-591 80 10/15/2020
3.2.5 646 10/12/2020
3.2.5-preview-590 100 10/12/2020
3.2.5-preview-589 85 9/14/2020
3.2.5-preview-588 88 9/14/2020
3.2.4 2,806 7/22/2020
3.2.4-preview-587 78 7/22/2020
3.2.4-preview-586 76 7/22/2020
3.2.4-preview-585 81 7/22/2020
3.2.2 759 7/21/2020
3.2.2-preview-584 100 7/21/2020
3.2.2-preview-583 96 7/21/2020
3.2.2-preview-582 117 7/18/2020
3.2.2-preview-581 122 7/18/2020
3.2.2-preview-580 130 7/17/2020
3.2.2-preview-579 148 7/17/2020
3.2.2-preview-578 164 7/17/2020
3.2.2-preview-577 71 7/17/2020
3.2.1 49,471 7/9/2020
3.2.1-preview-576 163 7/9/2020
3.2.1-preview-575 118 7/9/2020
3.2.1-preview-574 118 7/9/2020
3.2.1-preview-573 68 7/9/2020
3.2.1-preview-572 69 7/9/2020
3.2.1-preview-571 74 7/9/2020
3.2.1-preview-570 183 7/9/2020
3.2.1-preview-569 147 7/9/2020
3.2.1-preview-568 243 6/30/2020
3.2.1-preview-567 119 6/30/2020
3.2.0 1,977 6/29/2020
3.2.0-preview-565 147 6/29/2020
3.2.0-preview-564 74 6/29/2020
3.2.0-preview-563 71 6/29/2020
3.2.0-preview-562 69 6/29/2020
3.1.2 672 6/22/2020
3.1.2-preview-560 162 6/22/2020
3.1.2-preview-556 126 6/22/2020
3.1.2-preview-555 315 6/11/2020
3.1.2-preview-554 104 6/11/2020
3.1.2-preview-553 105 6/11/2020
3.1.1 258 6/11/2020
3.1.1-preview-552 95 6/11/2020
3.1.1-preview-551 107 6/10/2020
3.1.1-preview-550 90 6/10/2020
3.1.1-preview-549 98 6/9/2020
3.1.1-preview-548 87 6/9/2020
3.1.0 711 6/8/2020
3.1.0-preview-547 127 6/8/2020
3.1.0-preview-546 137 6/8/2020
3.1.0-preview-545 143 6/5/2020
3.1.0-preview-544 121 6/5/2020
3.1.0-preview-543 179 6/4/2020
3.1.0-preview-542 175 6/4/2020
3.1.0-preview-541 133 6/3/2020
3.1.0-preview-540 163 6/1/2020
3.1.0-preview-539 82 6/1/2020
3.1.0-preview-538 93 6/1/2020
3.1.0-preview-537 283 5/23/2020
3.1.0-preview-536 322 4/30/2020
3.1.0-preview-535 136 4/28/2020
3.1.0-preview-534 164 4/24/2020
3.1.0-preview-533 120 4/22/2020
3.1.0-preview-532 152 4/17/2020
3.1.0-preview-531 352 4/5/2020
3.1.0-preview-530 239 4/3/2020
3.1.0-preview-529 150 4/3/2020
3.1.0-preview-528 157 4/3/2020
3.1.0-preview-527 160 4/3/2020
3.1.0-preview-526 165 4/3/2020
3.1.0-preview-525 117 4/3/2020
2.9.0-preview-524 213 3/24/2020
2.9.0-preview-523 153 3/19/2020
2.9.0-preview-522 133 3/18/2020
2.9.0-preview-521 316 3/2/2020
2.9.0-preview-520 126 3/2/2020
2.9.0-preview-519 168 2/28/2020
2.9.0-preview-518 133 2/19/2020
2.9.0-preview-517 140 2/18/2020
2.9.0-preview-516 193 2/17/2020
2.9.0-preview-515 189 2/13/2020
2.9.0-preview-514 128 2/13/2020
2.8.9 4,104 1/15/2020
2.8.9-preview-513 176 1/15/2020
2.8.8 210 1/15/2020
2.8.7 566 1/3/2020
2.8.6 1,582 11/11/2019
2.8.5 5,292 10/3/2019
2.8.4 854 9/20/2019
2.8.3 1,285 9/12/2019
2.8.1 582 9/11/2019
2.7.8 1,598 6/25/2019
2.7.6 266 6/23/2019
2.7.5 1,832 6/10/2019
2.7.4 1,323 5/6/2019
2.7.3 3,865 3/7/2019
2.7.1 348 2/22/2019
2.6.8 465 1/31/2019
2.6.7 11,934 1/13/2019
2.6.5 752 12/27/2018
2.6.4 361 12/26/2018
2.6.3 79,757 10/24/2018
2.6.1 678 8/27/2018
2.6.0 8,002 6/15/2018
2.5.9 6,339 3/20/2018
2.5.8 2,065 2/8/2018
2.5.7 1,506 1/18/2018
2.5.6 9,183 11/24/2017
2.5.5 575 11/24/2017
2.5.4 671 8/27/2017
2.5.3 1,201 6/28/2017
2.5.2 931 6/9/2017
2.5.1 999 5/17/2017
2.4.8 1,724 5/15/2017
2.4.7 719 5/10/2017
2.4.6 593 5/10/2017
2.4.5 702 5/9/2017
2.4.3 1,046 5/3/2017
2.4.1 570 5/2/2017
2.3.2 613 3/24/2017
2.3.1 603 3/18/2017
2.3.0 578 3/17/2017
2.2.3 640 3/14/2017
2.2.2 621 3/11/2017
2.2.1 495 3/11/2017
2.2.0 600 3/2/2017
2.1.2 655 2/21/2017
2.1.1 694 2/18/2017
2.1.0 515 2/18/2017
2.0.33 561 2/14/2017
2.0.8 478 2/10/2017
2.0.6 525 2/9/2017
2.0.5 571 2/9/2017
1.0.160 601 1/26/2017
1.0.159 518 1/26/2017
1.0.142 514 1/18/2017
1.0.141 470 1/18/2017
1.0.140 552 1/17/2017
1.0.134 526 1/17/2017
1.0.133 478 1/17/2017
1.0.132 559 1/16/2017
1.0.130 486 1/16/2017
1.0.129 521 1/16/2017
1.0.128 525 1/16/2017
1.0.127 497 1/16/2017