This documentation is archived and is not being maintained.

IContract Interface

Represents the base interface for all contracts that are used for communication between components that are updated independently.

Namespace:  System.AddIn.Contract
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

Public Interface IContract

The IContract type exposes the following members.

Public methodAcquireLifetimeTokenSpecifies that the contract is accessible to a client until the client revokes the contract.
Public methodGetRemoteHashCodeReturns a hash code for the IContract.
Public methodQueryContractReturns a contract that is implemented by this contract.
Public methodRemoteEqualsIndicates whether the specified contract is equal to this IContract.
Public methodRemoteToStringReturns a string representation of the current IContract.
Public methodRevokeLifetimeTokenSpecifies that the contract is no longer accessible to a client.

The IContract interface defines a contract that independently updated components, such as an application and an add-in, can use to communicate. Components can use IContract to communicate across process or application domain boundaries, or to communicate with other components in the same process or application domain. IContract serves a similar purpose for components created using the .NET Framework as the IUnknown interface serves for components created using COM. To determine whether an object implements a particular contract, use the QueryContract method.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.