Releases: z4kn4fein/stashbox
Releases · z4kn4fein/stashbox
Stashbox v5.17.0
Added
PreferEnumerableInCurrent
option toResolutionBehavior
enum. When this option is used upon enumerable resolution the following applies:- When both
Current
andParent
behaviors are enabled, and the current container has the appropriate services, the resolution will prefer those and ignore the parent containers. When the current container doesn't have the requested services, the parent containers will serve the request.
- When both
Changed
- Enumerable resolution requests across child-parent containers resulted in the wrong order. Now, the resulting collection contains the parent services first and the child services at the end of the collection.
Stashbox v5.16.0
Added
- #165: A new
Override
type that provides more control over dependency overrides. Usage:var service = container.Resolve<IService>([ Override.Of(instance, "name") ]);
WithExceptionOverEmptyCollection()
container configuration option to control whether the container should return an empty collection or throw aResolutionFailedException
when a collection of services is requested but the wrapped service type is not resolvable.
Changed
- The
.Configure()
and.RegisterResolver()
methods now return with the actualIStashboxContainer
to allow a fluent call chain.
Stashbox v5.15.0
Added
- Option to turn off generic covariance and contravariance check during the resolution of generic type collections.
Stashbox v5.14.1
Fixed
- #163: Last-write win problem when hash collision happens.
Stashbox v5.14.0
Added
WithRequiredMemberInjection()
registration and container configuration option to control the auto injection ofrequired
members.
Stashbox v5.13.0
Added
- .NET 8.0 target.
- #134 Concept of Auto lifetime:
- It aligns to the lifetime of the resolved service's dependencies. When the underlying service has a dependency with a higher lifespan, this lifetime will inherit that lifespan up to a given boundary.
- Auto injection of
required
members. - MS.DI compatibility features for supporting keyed services:
DependencyName
attribute. When a parameter is marked with this attribute, the container will pass the given dependency's name to it.WithUniversalName()
container configuration method. It sets the universal name which is a special name that allows named resolution work for any given name.WithAdditionalDependencyNameAttribute()
container configuration method. It adds an attribute type that is considered a dependency name indicator just like theDependencyName
attribute.WithAdditionalDependencyAttribute()
container configuration method. It adds an attribute type that is considered a dependency indicator just like theDependency
attribute.
Stashbox v5.12.2
Fixed
- There was an issue where using decorators with instance registrations resulted in resolution failure.
Stashbox v5.12.1
Fixed
- #144: There was a case where closed generic decorators were not taken into account during service resolution.
- #143: Child scopes attached to their parents were not removed from disposal tracking when they were disposed individually.
- #141: There was a case where wrong decorators were selected during an
IEnumerable<T>
resolution call.
Stashbox v5.11.1
Fixed
- #142: Upon disposing child containers, their parents still held a strong reference to them.
Stashbox v5.11.0
Changed
- Moved several functions of
IDependencyResolver
to extension methods.