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
This creates a danger (actually have happened) of ability to inject IFoo directly bypassing the factory just because its interface binding is required for the factory to work.
Ideally, in such cases the extension method should be ToFactoryOf<Foo>() or ToFactory().Of<Foo>() which allows explicitly specify the implementation type without a necessity to bind it.
The text was updated successfully, but these errors were encountered:
With current design an end user must bind both a factory interface to a factory and the result interface to a concrete type:
This creates a danger (actually have happened) of ability to inject
IFoo
directly bypassing the factory just because its interface binding is required for the factory to work.Ideally, in such cases the extension method should be
ToFactoryOf<Foo>()
orToFactory().Of<Foo>()
which allows explicitly specify the implementation type without a necessity to bind it.The text was updated successfully, but these errors were encountered: