Register implementations in diferent projects #130
-
|
Hi, One example, I create a IBiometricAuth interface in the shared project, and I create a BiometricAuth implementation in the Android project and other BiometricAuth implementation in the desktop project. Is this even possible to achieve with Pure.DI? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
@fredericoregateiro, yes, of course, you can use Pure.DI to work with multiple projects and assemblies simultaneously. You can specify any types in the bindings, regardless of their location. Perhaps your question is about where to setup DI and about reusing settings between assemblies or projects? If so, the answer is as follows:
Quote from the book "Dependency Injection" by Mark Seemann:
|
Beta Was this translation helpful? Give feedback.
-
|
@NikolayPianikov Thanks for the rapid response. I've looked at the example, that's a clever trick, using the file as a link, something I hadn't thought of. My problem with this kind of project is that i need to use the implementations on the library, but they only exists in the Android or Desktop projects. Thanks |
Beta Was this translation helpful? Give feedback.
@fredericoregateiro sorry for the delay in responding. The problem is that the direction of dependencies for projects does not match the direction of dependencies for DI settings. Fixed in this PR.