在.NET RemotingServices中重用对象URI

时间:2021-05-15 11:58:27

If I create an object and marshal it across AppDomains using RemotingServices, like so:

如果我创建一个对象并使用RemotingServices在AppDomains上封送它,如下所示:

Object obj = new Object();
RemotingServices.Marshal(obj, null, null);

Is there a way to later marshal a new object using the same URI? I imagine I would have to remove the first object, but I can't figure out how to do that.

有没有办法在以后使用相同的URI编组新对象?我想我必须删除第一个对象,但我无法弄清楚如何做到这一点。

1 个解决方案

#1


0  

Yes, you'll need to disconnect the first object before you can marshal a new object using the same URI by calling:

是的,您需要断开第一个对象,然后才能通过调用以下方法使用相同的URI编组新对象:

RemotingServices.Disconnect(obj);

See RemotingServices.Disconnect

#1


0  

Yes, you'll need to disconnect the first object before you can marshal a new object using the same URI by calling:

是的,您需要断开第一个对象,然后才能通过调用以下方法使用相同的URI编组新对象:

RemotingServices.Disconnect(obj);

See RemotingServices.Disconnect