Can .NET AppDomains do this?
- by Eloff
I've spent hours reading up about AppDomains, but I'm not sure they work quite like I'm hoping.
If I have two classes, Foo in AppDomain #1, Bar in AppDomain #2:
App Domain #1 is the application. App Domain #2 is something like a plugin, and can be loaded and unloaded dynamically.
AppDomain #2 wants to create Foo and use it. Foo uses lots of classes in AppDomain #1 internally.
I don't want AppDomain #2 using object foo with reflection, I want it to use Foo foo, with all the static typing and compiled speed that goes with it. Can this be done considering that AppDomain #1, containing Foo, is never unloaded?
If so, does any remoting take place here when using Foo?
When I unload AppDomain #2, the type Foo is destroyed?