Export (0) Print
Expand All

IRemoteDelegateContract Interface

Defines a contract that components can use to access a delegate across application domain and process boundaries.

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

public interface IRemoteDelegateContract : IRemoteObjectContract, 

The IRemoteDelegateContract type exposes the following members.

Public methodAcquireLifetimeTokenSpecifies that the contract is accessible to a client until the client revokes the contract. (Inherited from IContract.)
Public methodGetRemoteHashCodeReturns a hash code for the IContract. (Inherited from IContract.)
Public methodGetRemoteTypeReturns an IRemoteTypeContract that specifies the type of the current IRemoteObjectContract. (Inherited from IRemoteObjectContract.)
Public methodInvokeDelegateInvokes the delegate that this IRemoteDelegateContract identifies.
Public methodQueryContractReturns a contract that is implemented by this contract. (Inherited from IContract.)
Public methodRemoteCastCasts the object identified by the current IRemoteObjectContract to a specified type. (Inherited from IRemoteObjectContract.)
Public methodRemoteEqualsIndicates whether the specified contract is equal to this IContract. (Inherited from IContract.)
Public methodRemoteToStringReturns a string representation of the current IContract. (Inherited from IContract.)
Public methodRevokeLifetimeTokenSpecifies that the contract is no longer accessible to a client. (Inherited from IContract.)

To invoke a delegate, use the InvokeDelegate method.

To add a delegate to an event or remove a delegate from an event, call the Invoke method of the IRemoteMethodInfoContract that is returned by GetAddMethod or GetRemoveMethod. Pass an IRemoteDelegateContract that represents the delegate to the parameters parameter of Invoke.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft