문제

I am currently developing an add-in system for a program I am writing, and have run into the issue of how the host and add-in should communicate on a common base. I use the System.AddIn namespace (previously called the MAF) for discovery, isolation, and activation of add-ins.

Now, since I want (need?) add-ins to exist in separate AppDomains from the host, there exists the problem that types cannot be shared between AppDomains and thus not between host and add-in. I understand there is some built-in support for type marshalling between AppDomains, but know nothing about this, nor whether it is even appropriate.

So the question is, what can I do if I want to share the same object (instance) between add-in and host in two separate app-domains? Perhaps there is a more subtle way around this problem?

도움이 되었습니까?

해결책

So it seems MarshalByRefObject and a few functions on the AppDomain object provides the basis for exactly what I want. Case closed for now, I think.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top