This project is read-only.


Prevent throwing NullReferenceException when applying property injection to Func<T> that returns null.


When users register a Func<T> delegate for the creation of a type, the container wraps this delegate in another delegate that performs a null check. This ensures that a descriptive exception is thrown in case the Func<T> returns null.

This null check however is currently added after applying property injection. If any properties are applied to a Func<T> registration, it would still result in a NullReferenceException in the case that the Func<T> returned null.
Closed Mar 26, 2013 at 12:48 PM by dot_NET_Junkie


dot_NET_Junkie wrote Mar 26, 2013 at 12:48 PM

Resolved with changeset 99520: Bugfix: NullReferenceException could be thrown by the container in case a Func was registered that returned null, while properties where applied (using a custom IPropertySelectionBehavior) to that given T.