CallContext.LogicalGetData比。 CallContext.GetData [英] CallContext.LogicalGetData Vs. CallContext.GetData
问题描述
该CallContext中API有LogicalGetData和放大器;的GetData,但MSDN文档并不做太多的解释两者之间的区别,以及它们之间的区别时。
The CallContext API has LogicalGetData & GetData, but the MSDN Documentation doesnt do much to explain the difference between the two, and when they differ.
任何想法?
推荐答案
<一个href="http://msdn.microsoft.com/en-us/library/system.runtime.remoting.messaging.callcontext.aspx#remarksToggle">It看来,这是一个微妙的差异与远程另一的AppDomain
作出的方法调用。在这种情况下一个 LogicalCallContext
被创建,数据存储在访问 LogicalGetData code>的方式。而在正常的,非远程的方法调用的数据存储在访问
的GetData code>的方式。
It appears that this is a subtle difference related to method calls made remotely to another AppDomain
. In this instance a LogicalCallContext
is created and the data is stored in a manner accessible to LogicalGetData
. While in normal, non-remoted method calls the data is stored in a manner accessible to GetData
.
在远程方法调用到一个对象在另一个的AppDomain中,CallContext中类生成一个LogicalCallContext实例传播以及远程调用。只露出ILogicalThreadAffinative接口和存储在CallContext中对象在一个LogicalCallContext在AppDomain外面传播。不支持该接口的对象不与远程方法调用LogicalCallContext实例传输。
When a remote method call is made to an object in another AppDomain, the CallContext class generates a LogicalCallContext instance that travels along with the remote call. Only objects that expose the ILogicalThreadAffinative interface and are stored in the CallContext are propagated outside the AppDomain in a LogicalCallContext. Objects that do not support this interface are not transmitted in LogicalCallContext instances with remote method calls.
的GetData code>:
检索对象从指定名称的 CallContext中
。
Retrieves an object with the specified name from the
CallContext
.
LogicalGetData code>:
检索与从逻辑调用上下文中的指定名称的对象。
Retrieves an object with the specified name from the logical call context.
这篇关于CallContext.LogicalGetData比。 CallContext.GetData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!