Hi, I'm currently building my own plug-in library. I don't want to use existing extensibility libraries due to several reasons.
Anyway, this is how I do it:
I create new appdomains to hold my plug-ins to easily unload them:
Then I inject my library to load the necessary assemblies and instantiate it:Code:AppDomain appDomain = AppDomain.CreateDomain("newdomain", AppDomain.CurrentDomain.Evidence, setup);
And from there I can load my real plug-in that implements MarshalByRefObj and call its members.Code:Loader ldr = (Loader)sandboxedDomain.CreateInstanceFromAndUnwrap(typeof(Loader).Assembly.Location, typeof(Loader).FullName);
But from the application domain of my plug-in; how can I get some of the objects from the host's AppDomain?
I'm avoiding the usage of TCP and I want to directly connect through the AppDomain.
Thanks for response.


Reply With Quote