You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have two factory implementations: IFactory/Factory and FactoryTyped. FactoryTyped is the preferable approach, since it is strongly typed (unlike IFactory) and is also automatically validated (an example can be found here). It should therefore probably become the standard factory class so we may want to rename it to just Factory during the next breaking version update
Both approaches have the issue that null arguments result in an exception being thrown. This is because both approaches rely on the type information to figure out which field/parameter to inject into. This is problematic when you actually do want to inject a null value so we need to address that. It is also an issue when you want to inject multiple instances of the same type into a class via factory arguments.
So I think we may want to use the ordering information provided to the factories to handle these cases.
The text was updated successfully, but these errors were encountered:
Currently, we have two factory implementations: IFactory/Factory and FactoryTyped. FactoryTyped is the preferable approach, since it is strongly typed (unlike IFactory) and is also automatically validated (an example can be found here). It should therefore probably become the standard factory class so we may want to rename it to just Factory during the next breaking version update
Both approaches have the issue that null arguments result in an exception being thrown. This is because both approaches rely on the type information to figure out which field/parameter to inject into. This is problematic when you actually do want to inject a null value so we need to address that. It is also an issue when you want to inject multiple instances of the same type into a class via factory arguments.
So I think we may want to use the ordering information provided to the factories to handle these cases.
The text was updated successfully, but these errors were encountered: