-
Notifications
You must be signed in to change notification settings - Fork 175
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
Access original instance from within overriding statement #43
Comments
No, there's no better way, sorry. Though, for this use case, I wouldn't bind directly
I realize this is not ideal. However, the branch 2.x is not developped anymore (unless for bug fixes). In branch 3.x, allowing overrides to access the overriden binding is an interesting idea. I'm not sure how much it would complicate the code. I'll think on it ;) |
I'm happy to report that access to overrides will be part of Kodein 3.2.0. Your use case will be as simple as:
Thanks for the great feature idea ;) Salomon. |
It's great. Thanks 👍 |
In tests I want to wrap real object with some test logic and pass wrapped instance to application.
Now for this case, I also provide implementation of object and use it only in override-provider, so it looks like this:
Are there ways to do it natively in Kodein 2.8.0? Is there any way to access original instance from within overriding statement?
The text was updated successfully, but these errors were encountered: