Skip to content

Releases: z4kn4fein/stashbox

Stashbox v5.16.0

21 Aug 12:49
Compare
Choose a tag to compare

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 a ResolutionFailedException 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 actual IStashboxContainer to allow a fluent call chain.

Stashbox v5.15.0

26 Jul 00:12
Compare
Choose a tag to compare

Added

  • Option to turn off generic covariance and contravariance check during the resolution of generic type collections.

Stashbox v5.14.1

08 Apr 11:11
Compare
Choose a tag to compare

Fixed

  • #163: Last-write win problem when hash collision happens.

Stashbox v5.14.0

15 Dec 01:58
Compare
Choose a tag to compare

Added

  • WithRequiredMemberInjection() registration and container configuration option to control the auto injection of required members.

Stashbox v5.13.0

18 Nov 23:54
7556ae3
Compare
Choose a tag to compare

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 the DependencyName attribute.
    • WithAdditionalDependencyAttribute() container configuration method. It adds an attribute type that is considered a dependency indicator just like the Dependency attribute.

Stashbox v5.12.2

05 Sep 16:00
Compare
Choose a tag to compare

Fixed

  • There was an issue where using decorators with instance registrations resulted in resolution failure.

Stashbox v5.12.1

05 Sep 09:39
Compare
Choose a tag to compare

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

16 Aug 20:56
Compare
Choose a tag to compare

Fixed

  • #142: Upon disposing child containers, their parents still held a strong reference to them.

Stashbox v5.11.0

21 Jun 20:57
Compare
Choose a tag to compare

Changed

  • Moved several functions of IDependencyResolver to extension methods.

Stashbox v5.10.2

13 Jun 18:59
Compare
Choose a tag to compare

Added

  • Access to the actual TypeInformation as a factory delegate input parameter. The TypeInformation holds every reflected context information about the currently resolving type. This can be useful when the resolution is, e.g., in an open generic context, and we want to know which closed generic variant is requested.
    container.Register(typeof(IService<>), options => options.WithFactory<TypeInformation>(typeInfo => 
       {
          /* typeInfo.Type holds the currently resolving closed generic type */
       }));