我需要将实例传递给(而不是来自)AppDomain。我已经看到很多关于如何做相反的信息(在域上调用创建并在本地使用对象),但我想要传递一个我已经拥有的实例(不是我从域对象创建的实例),这个实例是一个 MarshalByRefObject,我想将它从我的主域传递到另一个域。这可能吗?
var MyObject = GetAlreadyPopulatedObject();
AnotherDomain.MakeObjectVisible(MyObject); // this is what i'm trying to do, make the instance i have available somewhere else
// And if it's possible, how would i access it from the other Domain? How can i find it?
我的场景是我正在处理我创建的数据,我想将它传递给另一个应用程序域中的插件进行操作,然后检索修改后的版本,我有点不知所措。