什么是MarshalByRefObject的主要用途?主要用途、MarshalByRefObject

2023-09-02 21:50:00 作者:撒谎就要用心来圆谎。

有什么目的MarshalByRefObject的?

What's the purpose for MarshalByRefObject?

推荐答案

远程处理;这意味着应用程序域或机器之间,而不是序列并传输的对象的,该对象保持在一端和一个代理在其另一创建。所有的方法调用代理被截获和通话的传输为RPC 维基 ,msdn,导致其他机器上执行的方法(通常连载的参数和返回值)。

Remoting; it means that between AppDomains or machines, rather than serialize and transfer the object, the object stays at one end and a proxy is created at the other. All method calls to the proxy are intercepted and the call is transmitted as RPC wiki, msdn, causing the method to execute on the other machine (typically serialising the arguments and return value).

请注意:这可能会导致意外健谈的接口。对象/代理/ RPC方法是现在比较少preferable与方法的一个的明确的服务范围;微软现在建议WCF 维基,的 MSDN 而不是远程处理。

Note: this can lead to unexpectedly "chatty" interfaces. The object/proxy/RPC approach is now less preferable to approaches with an explicit service boundary; Microsoft now recommends WCF wiki, msdn instead of remoting.

 
精彩推荐
图片推荐