IContract IContract IContract IContract Interface


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

public interface class IContract
public interface IContract
type IContract = interface
Public Interface IContract


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.


AcquireLifetimeToken() AcquireLifetimeToken() AcquireLifetimeToken() AcquireLifetimeToken()

Specifies that the contract is accessible to a client until the client revokes the contract.

GetRemoteHashCode() GetRemoteHashCode() GetRemoteHashCode() GetRemoteHashCode()

Returns a hash code for the IContract.

QueryContract(String) QueryContract(String) QueryContract(String) QueryContract(String)

Returns a contract that is implemented by this contract.

RemoteEquals(IContract) RemoteEquals(IContract) RemoteEquals(IContract) RemoteEquals(IContract)

Indicates whether the specified contract is equal to this IContract.

RemoteToString() RemoteToString() RemoteToString() RemoteToString()

Returns a string representation of the current IContract.

RevokeLifetimeToken(Int32) RevokeLifetimeToken(Int32) RevokeLifetimeToken(Int32) RevokeLifetimeToken(Int32)

Specifies that the contract is no longer accessible to a client.

Applies to