I'm developing an application that provides plugins. I'm using Managed Add-In Framework for my aim. Is there a way to call host's method from add-in?
Asked
Active
Viewed 323 times
1 Answers
0
Yes, you define an interface in the contract (and in both views) and then you create a concrete implementation of that interface on the host adapter side and pass that into a method on the addin.
One simple example would be having a logger interface (ILogger
) and implementing a logger in the host view. Then you could create a AddInInitialize
method in your contract that takes an ILogger
. It can then call methods on that ILogger
and it will go across the MAF boundry (cross process or not depending on your setup) to make the appropriate calls.

John Koerner
- 37,428
- 8
- 84
- 134
-
Do you have a example. I tried to follow your explations, but i got stucked. – Shazter May 22 '17 at 14:32
-
I found this example https://clraddins.codeplex.com/releases/view/10199 – Shazter May 24 '17 at 19:23