ContractBase 类

定义

提供 IContract 成员的默认实现。

public ref class ContractBase : MarshalByRefObject, System::AddIn::Contract::IContract, System::Runtime::Remoting::Lifetime::ISponsor
public class ContractBase : MarshalByRefObject, System.AddIn.Contract.IContract, System.Runtime.Remoting.Lifetime.ISponsor
type ContractBase = class
    inherit MarshalByRefObject
    interface IContract
    interface ISponsor
Public Class ContractBase
Inherits MarshalByRefObject
Implements IContract, ISponsor
继承
ContractBase
实现

注解

协定定义宿主和外接程序使用的类型和方法。 所有协定必须派生自 IContract 。 此类提供成员的默认实现 IContract

构造函数

ContractBase()

初始化 ContractBase 类的新实例。

方法

AcquireLifetimeToken()

获取一个生存期标记。

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。

(继承自 MarshalByRefObject)
Equals(Object)

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

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetLifetimeService()
已过时。

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

(继承自 MarshalByRefObject)
GetRemoteHashCode()

获取当前 ContractBase 对象的哈希代码。

GetType()

获取当前实例的 Type

(继承自 Object)
InitializeLifetimeService()
已过时。

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

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
MemberwiseClone(Boolean)

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

(继承自 MarshalByRefObject)
OnFinalRevoke()

当在外接程序端适配器中被重写时,释放该适配器占用的本机资源。

QueryContract(String)

如果当前对象实现协定,则反射该协定的实例并返回 this 指针。

RemoteEquals(IContract)

比较一个对象是否与远程对象相等。

RemoteToString()

获取一个标识远程对象的字符串。

Renewal(ILease)

请求发起客户端续订指定对象的租约。

RevokeLifetimeToken(Int32)

从未处理的生存期标记列表中移除指定的标记。

ToString()

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

(继承自 Object)

适用于

另请参阅