LogicalCallContext 类

定义

提供一组在远程方法调用期间随执行代码路径一起携带的属性。

public ref class LogicalCallContext sealed : ICloneable, System::Runtime::Serialization::ISerializable
[System.Serializable]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[<System.Serializable>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Security.SecurityCritical>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
Public NotInheritable Class LogicalCallContext
Implements ICloneable, ISerializable
继承
LogicalCallContext
属性
实现

注解

LogicalCallContext 类是在对远程应用程序域的方法调用期间使用的类的版本 CallContextCallContext它是一个专用集合对象,类似于方法调用的线程本地存储,并提供对每个逻辑执行线程唯一的数据槽。 槽不会在其他逻辑线程上的调用上下文之间共享。 对象可以在执行代码路径向下和向上传输时添加到 CallContext 该对象中,并按路径上的各种对象进行检查。

当对另一个 AppDomain对象进行远程方法调用时,类 CallContext 将生成一个 LogicalCallContext 随远程调用一起传输的对象。 只有公开ILogicalThreadAffinative接口并存储在接口中的CallContext对象才会在内部LogicalCallContext传播AppDomain。 不支持此接口的对象不会在具有远程方法调用的实例中 LogicalCallContext 传输。

注释

此类需要链接。 如果即时调用方没有基础结构权限,则会引发 SecurityException。

属性

名称 说明
HasInfo

获取一个值,该值指示当前 LogicalCallContext 是否包含信息。

方法

名称 说明
Clone()

创建一个新对象,该对象是当前实例的副本。

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
FreeNamedDataSlot(String)

用指定名称清空数据槽。

GetData(String)

从当前实例中检索与指定名称关联的对象。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetObjectData(SerializationInfo, StreamingContext)

使用序列化当前LogicalCallContext数据所需的数据填充指定的SerializationInfo值。

GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
SetData(String, Object)

将指定的对象存储在当前实例中,并将其与指定名称相关联。

ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于