Ninject v3.2 Release Notes

  • โž• Added

    • ๐Ÿ‘ป bool IRequest.ForceUnique: In case there is an uncoditional and a conditional binding, return the conditional one. In case there are multiple unconditional or conditional bindings, throw an exception.
    • IResolutionRoot.TryGetAndThrowOnInvalidBinding (extension method): Returns null if there is no binding, but throws ActivationException in case there is a binding which could not be activated.
    • TypeMatchingConstructorArgument introduced.
    • ToConstructor() can now accept results from methods as argument e.g. ToConstructor(_ => new Foo(this.GetBar())
    • WhenNoAncestorMatches, WhenAnyAncestorMatches and WhenNoAncestorNamed When overloads
    • WeakConstructorArgument and WeakPropertyValue that keep a weak reference to the value only so that Ninject has no reference on them when caching the created instance.
    • ๐Ÿ‘ Overloads for WhenInjectedInto and WhenInjectedExactlyInto that take multiple types to support multiple allowed parents.

    ๐Ÿ”„ Changed

    • โž• Added WhenAnyAncestorNamed and marked mispelled WhenAnyAnchestorNamed as obsolete
    • ๐Ÿš€ Release method was moved from IKernel to the IResolutionRoot interface

    ๐Ÿ›  Fixed

    • Private properties of base class were not checked for existence of setter and Inject attribute
    • ๐Ÿš€ When an object that is the scope of another object is released an Exception was thrown.