Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common code and create abstractions in Fluent utility classes and factories #22

Open
iravanchi opened this issue Sep 20, 2019 · 0 comments

Comments

@iravanchi
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant