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, generic Foo<T> 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<Bar> and use it. Foo<T> 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<Bar> foo, with all the static typing and compiled speed that goes with it. Can this be done considering that AppDomain #1, containing Foo<T>, is never unloaded?
If so, does any remoting take place here when using Foo<Bar>?
When I unload AppDomain #2, the type Foo<Bar> is destroyed?
edit SO stripped all my <>, added them back manually.