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
The methods ForComponent and ForGenericComponent in the ComponentContextFluentExtensions class do similar things for generic and non-generic types, but the return types are totally unrelated.
In addition to code duplication between FluentGenericLocalComponentConfig and FluentLocalComponentConfig classes, the user of the methods should know / determine which method to call for which Type, and there's no way to use similar methods in an abstract way (eg. when registering a list of types that contain mixed open and closed generic types and non-generic types)
There's also a lot of similar code in different IComponentFactory implementations, and it can be nicer if refactored.
The text was updated successfully, but these errors were encountered:
The methods
ForComponent
andForGenericComponent
in theComponentContextFluentExtensions
class do similar things for generic and non-generic types, but the return types are totally unrelated.In addition to code duplication between
FluentGenericLocalComponentConfig
andFluentLocalComponentConfig
classes, the user of the methods should know / determine which method to call for which Type, and there's no way to use similar methods in an abstract way (eg. when registering a list of types that contain mixed open and closed generic types and non-generic types)There's also a lot of similar code in different
IComponentFactory
implementations, and it can be nicer if refactored.The text was updated successfully, but these errors were encountered: