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.