什么是MarshalByRefObject的主要用途? [英] What is the major use of MarshalByRefObject?

查看:637
本文介绍了什么是MarshalByRefObject的主要用途?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么目的MarshalByRefObject的?

What's the purpose for MarshalByRefObject?

推荐答案

远程处理;这意味着应用程序域或机器之间,而不是序列并传输的对象的,该对象保持在一端和一个代理在其另一创建。所有的方法调用代理被截获和通话的传输为RPC 维基 ,<一个href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa378651%28v=vs.85%29.aspx">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.

这篇关于什么是MarshalByRefObject的主要用途?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆