ContextBoundObject 类

定义

定义所有上下文绑定类的基类。

public ref class ContextBoundObject abstract : MarshalByRefObject
[System.Serializable]
public abstract class ContextBoundObject : MarshalByRefObject
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class ContextBoundObject : MarshalByRefObject
public abstract class ContextBoundObject : MarshalByRefObject
[<System.Serializable>]
type ContextBoundObject = class
    inherit MarshalByRefObject
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ContextBoundObject = class
    inherit MarshalByRefObject
type ContextBoundObject = class
    inherit MarshalByRefObject
Public MustInherit Class ContextBoundObject
Inherits MarshalByRefObject
继承
ContextBoundObject
派生
属性

注解

驻留在上下文中并绑定到上下文规则的对象称为上下文绑定对象。 上下文是一组属性或使用规则,用于定义对象集合所在的环境。 当对象进入或离开上下文时,将强制实施这些规则。 非上下文绑定的对象称为敏捷对象。

上下文是在对象激活期间创建的。 新对象放置在现有上下文中,或放入使用类型元数据中包含的属性创建的新上下文中。 上下文绑定类使用提供使用规则的标记 ContextAttribute 。 可添加的上下文属性包括有关同步和事务的策略。

实施者说明

公共语言运行时的当前版本不支持泛型类型或具有泛 ContextBoundObject 型方法的非泛 ContextBoundObject 型类型。 尝试创建此类类型的实例会导致 < a0 /> 。

构造函数

名称 说明
ContextBoundObject()

实例化类的 ContextBoundObject 实例。

方法

名称 说明
CreateObjRef(Type)

创建一个对象,其中包含生成用于与远程对象通信的代理所需的所有相关信息。

(继承自 MarshalByRefObject)
Equals(Object)

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

(继承自 Object)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 Type

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。

(继承自 MarshalByRefObject)
ToString()

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

(继承自 Object)

适用于

另请参阅