How to run a method in a separate AppDomain?

In my script, I want to execute a method in a separate AppDomain. How many different ways could be done to achieve this?

In particular, I have the following question:

  • Can I load an assembly in AppDomain A and execute its method in AppDomain B?
  • I seem to achieve this with the AppDomain.DoCallBack and CrossAppDomainDelegate method . I just can’t understand how it makes sense to have an assembly and a method in different AppDomains. Is the same assmebly loaded again in another AppDomain to execute the method?
+5
source share
2 answers

AppDomain, , , AppDomain. AppDomain "CreateInstance" AppDomain.

, AppDomains - . AppDomain, IPC-ish.

, , - . http://blogs.msdn.com/b/suzcook/archive/2003/06/12/57169.aspx

, , .

CreateInstance AppDomain. CreateInstanceFromAndUnwrap() .

, ... , , , .

+5

Rob, , , AppDomain, , .

+1

All Articles