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

More flexible type conversions while injections #2

Open
VitaliyMF opened this issue Dec 13, 2023 · 0 comments
Open

More flexible type conversions while injections #2

VitaliyMF opened this issue Dec 13, 2023 · 0 comments

Comments

@VitaliyMF
Copy link
Contributor

The component may have a dependency type which is generally compatible with injected implementation but this conversion is not supported by default type converters. For example DictionaryDescriptor always constructs IDictionary<string,object> and if dependency type is IDictionary<string,string> there will be an injection error. It is possible to have type converter that handles that automatically and creates compatible implementation if possible.

In general, it makes sense to introduce some kind of ITypeConverter to allow app-specific extensions for the implicit type casts.

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

No branches or pull requests

1 participant