ContractBase 類別

定義

提供 IContract 成員的預設實作。Provides a default implementation of IContract members.

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
實作

備註

合約會定義主機和增益集所使用的類型和方法。Contracts define the types and methods used by the host and the add-in. 所有合約都必須衍生自 IContractAll contracts must derive from IContract. 這個類別會提供成員的預設執行 IContractThis class provides the default implementation of IContract members.

建構函式

ContractBase()

初始化 ContractBase 類別的新執行個體。Initializes a new instance of the ContractBase class.

方法

AcquireLifetimeToken()

取得存留期語彙基元。Obtains a lifetime token.

CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(繼承來源 MarshalByRefObject)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetLifetimeService()
已過時。

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(繼承來源 MarshalByRefObject)
GetRemoteHashCode()

取得目前 ContractBase 物件的雜湊程式碼。Gets the hash code for the current ContractBase object.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
InitializeLifetimeService()
已過時。

取得存留期服務物件,以控制這個執行個體的存留期原則。Obtains a lifetime service object to control the lifetime policy for this instance.

(繼承來源 MarshalByRefObject)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。Creates a shallow copy of the current MarshalByRefObject object.

(繼承來源 MarshalByRefObject)
OnFinalRevoke()

在增益集端配置器中覆寫時,釋放配置器所持有的原生資源。When overridden in an add-in-side adapter, releases native resources held by the adapter.

QueryContract(String)

反映合約執行個體,如果目前物件實作該合約,則傳回 this 指標。Reflects over the instance of a contract and returns the this pointer if the current object implements that contract.

RemoteEquals(IContract)

比較物件與遠端物件是否相等。Compares an object with a remote object for equality.

RemoteToString()

取得識別遠端物件的字串。Gets a string that identifies a remote object.

Renewal(ILease)

要求贊助的用戶端更新指定物件的使用期。Requests a sponsoring client to renew the lease for the specified object.

RevokeLifetimeToken(Int32)

從未處理的存留期語彙基元清單中移除指定的語彙基元。Removes the specified token from the list of outstanding lifetime tokens.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱