3 ms·
There is something I don't understand. You can add other project code to your own project, but how do you use that other code? In the .NET world where I live yo
by bagosm 13y ago
There is something I don't understand. You can add other project code to your own project, but how do you use that other code? In the .NET world where I live you can reference an Interface and let runtime fill that interface in (with a proper dependency injection method).
For example you know you want an Interface of MailSender that has the method .SendEmail() and it gets filled with SMTPMailer which has SMTPMailer.SendEmail()
Is this thing similar to that concept but in build-time? How do you know the interface/usage beforehand?
- mrich 13y agoMost open source libraries are written in C/C++. The interface is usually described in header files, you need them to compile your program. The implementation itself is contained in a library, which you link into your program. There is also the possibility to resolve the implementation at runtime via shared libraries.
- chris_va 13y ago"reference the Interface" requires that the interface files exist, and that they (plus the implementation) gets built into your project. That is what Repobuild covers. The actual mechanics of the .net runtime would stay the same.